-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support parallel execution and fix issue with testcase stats not available #8
Support parallel execution and fix issue with testcase stats not available #8
Conversation
@AmsterGet @peterngtr @DavertMik any chance of merging this guys? |
thank you for the merge @peterngtr 🙏 is it possible to trigger the publish the new version to npm registry? so that the dependency can be picked up from codeceptjs plugin side.... |
Hi @m3t4n i don't think i have any permissions to publish the new version of this repo. 😅 |
thank you @peterngtr for the prompt response. |
@@ -102,7 +102,7 @@ module.exports = (config) => { | |||
|
|||
event.dispatcher.on(event.suite.before, (suite) => { | |||
recorder.add(async () => { | |||
suiteObj = startTestItem(suite.title, rp_SUITE); | |||
suiteObj = startTestItem(suite.title, rp_TEST); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After that changes the structure TEST -> STEP -> NESTED STEP (if applicable)
will be presented.
Is it a good idea to avoid suites in the reporting structure? I suggest to use the following structure: SUITE -> TEST (if applicable) -> STEP -> NESTED STEP (if applicable)
, as from reportportal side we expect the top level suite as a container of tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what do you think about @DavertMik work on this for Codecept 3.0+
#3
May be better to implement it on the integration side to avoid additional work with bootstrapAll
and teardownAll
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @AmsterGet thank you for your attention.
I agree with the suite > test > step > nestedStep structure. However, on the RP side it's represented as LaunchName > Suite > Test > Step > nestedStep and hence I believe @ilangv 's change (i might be wrong). Whereas I agree with you but maybe an improvement point on this is that after Suite the tests can be expanded instead of navigating to a new page (like nested steps do). Personally, I find it hard to reach the steps.
On the other hand @DavertMik's change seems to be the stable choice. Currently, it is not possible to properly display the parallel executions without any update on this plugin side. The suites are randomly placed under launches and this makes it really hard to see which ones are under which launch. Another option might be appending the suite name to launch id (thinking out loud).
@DavertMik: any chance on finalizing the PR? CodeceptJS is already 3.2.3.
This PR addresses below issues:
Parallel Execution:
Running codecept tests in parallel using
run-multiple
orrun-workers
creates a new launch for each child process. With this approach test config can implement bootstrapAll and teardownAll functions to create a launch and pass the launch id to child processes and env variable as shown below:Testcase widget issues
Reportportal widgets like
Most time consuming tests
,Flaky tests table
do not render any data. This is because all the nested steps are published withhasStats=false
. In-order to get test or BDD scenario level stats, reportportal expects aTest
->Step
->Nested Step
structure. Updated the events to follow this structure.