-
-
Notifications
You must be signed in to change notification settings - Fork 159
feat(playwright): support for worker-scope actors and improved reporting #2788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…WithPlaywright parameters - The ability to BrowseTheWebWithPlaywright now separates the BrowserContextOptions parameter, available when creating an ability using the Playwright browser but not the page, from the ExtraBrowserContextOptions, available for both the browser and the page. This change tightens the API and clarifies that certain options are not available when passing an already-configured page. - SerenityOptions and SerenityFixtures are now merged and available as SerenityFixtures to be used with defineConfig\<SerenityFixtures\> to follow the current Playwright Test convention - New type SerenityWorkerFixtures introduced to allow for separating test-scoped and worker-scoped Serenity fixtures in future releases
…as optional to follow Playwright configuration conventions
to demonstrate usage of the new SerenityFixtures and SerenityWorkerFixtures
…r scope This will enable using actors in beforeAll and afterAll hooks
… afterAll hooks This change enables using actors to perform worker-scope setup and teardown tasks
…ght Test IDs This refactoring will help to simplify Serenity/JS reporting mechanism for Playwright Test
moved the old tests to the new directory structure and cleaned up the promise handling to make the tests easier to understand
…d" if they pass upon first try Previously, retryable test scenarios were incorrectly tagged as "retried" in the Serenity BDD report even if they passed upon first attempt. With this change, a test is only marked as retried if it has failed at least once.
Moved the failure reporting integration tests to the new directory structure and cleaned up the code
…oreAll/afterAll/generator
…non-screenplay scenarios
this allows for the actors who were active before calling `configure` to be correctly dismissed when the scenario is finished
491067a
to
03f74bf
Compare
…nism instead of using Playwright attachments to share the information about domain events that occurred during the test scenario, Serenity/JS test fixtures will now automatically write the events to files under test-results and use Playwright-provided testIds to associate the events with the correct test. This meachanism simplifies the original implementation and avoids making the internal Serenity events visible as attachments in the Playwright HTML report. This new mechanism will also make extending Serenity/JS reporting capabilities easier in the future.
…in beforeAll and afterAll hooks
…y project Previously, retried test scenarios were reported separately, which could make anylysing the report challenging. Now, even though the results are still reported separately, the test reports for retried tests are aggregated and presented together, making it easier to spot common failure patterns. Playwright Test project name is now highlighted in the Serenity BDD using a dedicated project tag. This allows for filtering test results by project they belong to.
… only when necessary
tests repeated via Playwright Test --repeat-each=N are now reported individually
to help differentiate between the same test case executed in the context of different Playwright Test "projects", project name is now appended to the title of the test scenario
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The ability to
BrowseTheWebWithPlaywright
now separates the BrowserContextOptions parameter, available when creating an ability using the Playwright browser but not the page, from theExtraBrowserContextOptions
, available for both the browser and the page. This change tightens the API and clarifies that certain options are not available when passing an already-configured page.SerenityOptions
andSerenityFixtures
are now merged and available asSerenityFixtures
to be used withdefineConfig<SerenityFixtures>
to follow the current Playwright Test conventionNew type
SerenityWorkerFixtures
introduced to allow for separating test-scoped and worker-scoped Serenity fixtures in future releasesRetried tests aggregated, similar to scenario outlines
Repeated tests reported individually
Enabled filtering by project name in Serenity BDD reports