Skip to content
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

Add Environment Name To Descriptor Unique Signatures #5294

Merged
merged 16 commits into from Dec 19, 2018
Merged

Add Environment Name To Descriptor Unique Signatures #5294

merged 16 commits into from Dec 19, 2018

Conversation

Tenzian
Copy link
Contributor

@Tenzian Tenzian commented Dec 13, 2018

Fixes Codeception/phpunit-wrapper#4

When running tests using multiple environments in serial, i.e.

codecept run --html --env=one --env=two --env=three 

Test descriptor function getTestSignatureUnique() does not return unique signatures across environments. Features using the unique signature (e.g. the phpunit-wrapper html report) can then conflate the tests.

In the case of the html report this causes a test that fails for an environment to appear as failed in the report for subsequent environments, even if it passes in those other environments.

Fixed by adding the test case's environment name to the unique signature.

Copy link
Member

@Naktibalda Naktibalda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea overall, but I have a few comments below.

src/Codeception/Test/Descriptor.php Outdated Show resolved Hide resolved
src/Codeception/Test/Descriptor.php Outdated Show resolved Hide resolved
Issue: Codeception/phpunit-wrapper#4

- initialise $env and $example as empty strings
- keep empty string values for concatenation if there's no scenario or example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants