top of page

REST(mocks)

"And when the last log disappears, all that will be left is the silence of the processor."

bugreaper-api_compr.png

Module for interaction with API and mock-server

Interaction:


resetMocks

cleanMockLogs

showMockLogs

showBaseRequestsList

createMock

createMockCustom

Asserts:

Get data:

assertAllMocksCount

assertAllMocksCount

assertMocksCountWithAwait

verifyMock

verifyMockWithAwait

verifyMockCustom

verifyMockCustomWithAwait

verifyMockSequence

verifyMockSequenceWithAwait

grabResponseHeader

Configs:

.withAwaitMs

.withEnchantedReport

.withLogging

Interactions


resetMocks

()

Reset mock server

cleanMockLogs

()


Clean mock-server logs (requests/responses)

showMockLogs

()

Add attachment with mock server logs (requests/responses)

attach: mock-sever LOG

showBaseRequestsList

()


Add attachment with mock requests list (only method and path)

attach: List with requests method/path

createMock

(String mockExpectation)

Create mock expectation

attach: mock expectation JSON

createMockCustom

(String description, String path)

Create mock expectation from file

attach: mock expectation JSON

Asserts

assertAllMocksCount

(int statusCode)

Assert of all requests to mock-server count exactly

assertAllMocksCount

()

Assert of all requests to mock-server count exactly

assertAllMocksCount

(long timeMs)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(String path, Matcher matcher)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(String header, Matcher matcher)

Assert of all requests to mock-server count exactly

assertAllMocksCount

()

Assert of all requests to mock-server count exactly

assertAllMocksCount

(String expectedBody)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(Path path)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(String expectedBody)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(Path path)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(String expectedBody)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(String expectedBody)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(Path path)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(Path path)

Assert of all requests to mock-server count exactly

assertAllMocksCount

(int expectedCount)

Assert of all requests to mock-server count exactly

Get Data


getRequestBodyValue

(String header)

Grab response header data

attach: result

Configs

.withAwaitMs

(int awaitMs)

Configure await in asserts with await

.withEnchantedReport

(boolean enchantedReport)

Enabling or disabling enchanted mockVerify report

Attachments with difference expected/actual requests

.withLogging

(boolean enable)


Enables or disables logging manuall

(debug log level will print logs anyway!)

© 2026 BUGREAPER

bottom of page