user2320340
user2320340

Reputation: 53

Is there a way to pause/resume a serenity-js test run to check the browser?

In a test context, we have been setting up a mock to behave a certain way including accessing the service under test, and we want to inspect the browser mid test because it isn't working in the way we expected.

Accessing the mock url direct doesnt give us the insight we need - we want to set headless:false and inspect the browser in the test execution.

Ca we set a pause/resume so we can check what we want? Then I guess cancelling the run is the simplest next step, or maybe continuing?

Upvotes: 1

Views: 313

Answers (2)

Brad Turek
Brad Turek

Reputation: 2882

Yes! You can use the Debug interaction.

Debug.values(() => {
    // set breakpoint on this line
}),

Here's a tutorial on how to use Debug.

Upvotes: 0

viper3400
viper3400

Reputation: 1

Not sure if I understood you right, but maybe you can use a Wait.for(Duration.ofMinutes(60)) (see Wait (Serenity/JS 2.x) or Wait (Serenity/JS 3.x).

Then you should have enough time to inspect your systems.

Upvotes: 0

Related Questions