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

Substeps in HTML ResultPrinter are not properly rendered #3410

Closed
niclopez opened this issue Aug 5, 2016 · 0 comments
Closed

Substeps in HTML ResultPrinter are not properly rendered #3410

niclopez opened this issue Aug 5, 2016 · 0 comments
Labels

Comments

@niclopez
Copy link
Contributor

@niclopez niclopez commented Aug 5, 2016

Since "substeps" were implemented, HTML are not rendered with success. I think is not easier as it seems (only case 4 fails), because there are many possible scenarios. I try to explain below:

CASE 1 (SUCCESS)

    public function demo(FunctionalTester $I)
    {
        $I->comment('no metaStep');
        $I->comment('no metaStep');
    }
Codeception PHP Testing Framework v2.2.3
Powered by PHPUnit 5.4.8 by Sebastian Bergmann and contributors.
[Groups] demo 

Functional Tests (1) -----------------------------------------------------------------------------
TemplateDemoCest: Demo
Signature: TemplateDemoCest:demo
Test: tests/functional/templateDemoCest.php:demo
Scenario --
 no metaStep
 no metaStep
 PASSED 

RESULT:
case1

CASE 2 (SUCCESS)

    public function demo(FunctionalTester $I)
    {
        $I->comment('no metaStep');
        $I->demoAction1();
        $I->comment('no metaStep');
    }
Codeception PHP Testing Framework v2.2.3
Powered by PHPUnit 5.4.8 by Sebastian Bergmann and contributors.
[Groups] demo 

Functional Tests (1) -----------------------------------------------------------------------------
TemplateDemoCest: Demo
Signature: TemplateDemoCest:demo
Test: tests/functional/templateDemoCest.php:demo
Scenario --
 no metaStep
 I demo action1 
   I am on page "http://www.google.es"
   I am on page "http://www.google.com"
 no metaStep
 PASSED 

RESULT:
case2

CASE 3 (SUCCESS)

    public function demo(FunctionalTester $I)
    {
        $I->comment('no metaStep');
        $I->demoAction1();
        $I->comment('no metaStep');
        $I->demoAction2();
    }
Codeception PHP Testing Framework v2.2.3
Powered by PHPUnit 5.4.8 by Sebastian Bergmann and contributors.
[Groups] demo 

Functional Tests (1) -----------------------------------------------------------------------------
TemplateDemoCest: Demo
Signature: TemplateDemoCest:demo
Test: tests/functional/templateDemoCest.php:demo
Scenario --
 no metaStep
 I demo action1 
   I am on page "http://www.google.es"
   I am on page "http://www.google.com"
 no metaStep
 I demo action2 
   I am on page "https://es.yahoo.com/"
 PASSED 

RESULT:
case3

CASE 4 (FAIL) Only the last step is rendered...

    public function demo(FunctionalTester $I)
    {
        $I->demoAction1();
        $I->demoAction2();
    }
Codeception PHP Testing Framework v2.2.3
Powered by PHPUnit 5.4.8 by Sebastian Bergmann and contributors.
[Groups] demo 

Functional Tests (1) -----------------------------------------------------------------------------
TemplateDemoCest: Demo
Signature: TemplateDemoCest:demo
Test: tests/functional/templateDemoCest.php:demo
Scenario --
 I demo action1 
   I am on page "http://www.google.es"
   I am on page "http://www.google.com"
 I demo action2 
   I am on page "https://es.yahoo.com/"
 PASSED 

RESULT:
case4

CASE 5 (SUCCESS)

    public function demo(FunctionalTester $I)
    {
        $I->comment('no metaStep');
        $I->demoAction1WithNestedNoMetastep();
        $I->comment('no metaStep');
        $I->demoAction2();
    }
Codeception PHP Testing Framework v2.2.3
Powered by PHPUnit 5.4.8 by Sebastian Bergmann and contributors.
[Groups] demo 

Functional Tests (1) -----------------------------------------------------------------------------
TemplateDemoCest: Demo
Signature: TemplateDemoCest:demo
Test: tests/functional/templateDemoCest.php:demo
Scenario --
 no metaStep
 I demo action1 with nested no metastep 
   I am on page "http://www.google.es"
 no mestastep inside a method
 I demo action1 with nested no metastep 
   I am on page "http://www.google.com"
 no metaStep
 I demo action2 
   I am on page "https://es.yahoo.com/"
 PASSED 

RESULT:
case5

CASE 6 (SUCCESS)

    public function demo(FunctionalTester $I)
    {
        $I->demoAction1WithNestedNoMetastep();
        $I->demoAction2();
    }
Codeception PHP Testing Framework v2.2.3
Powered by PHPUnit 5.4.8 by Sebastian Bergmann and contributors.
[Groups] demo 

Functional Tests (1) -----------------------------------------------------------------------------
TemplateDemoCest: Demo
Signature: TemplateDemoCest:demo
Test: tests/functional/templateDemoCest.php:demo
Scenario --
 I demo action1 with nested no metastep 
   I am on page "http://www.google.es"
 no mestastep inside a method
 I demo action1 with nested no metastep 
   I am on page "http://www.google.com"
 I demo action2 
   I am on page "https://es.yahoo.com/"
 PASSED 

RESULT:
case6

reinholdfuereder pushed a commit to reinholdfuereder/Codeception that referenced this issue Sep 28, 2019
…nce tests in HTML Report after update to v3.0.x

- Give new test cases in CodeceptionIssue4413Cest meaningful names (keep references to original cases from Codeception#3410 in comments)
- In order to nicely assert for them being correctly printed in HTML report extract '\Codeception\Test\Descriptor::getTestCaseNameAsString'
Naktibalda added a commit that referenced this issue Nov 23, 2019
…ually check the HTML report!) based on new "html_report" test suite

Add HTML report "structure" checks based on regex created via builder pattern: note the test succeeds (with bug #4413) due to a manipulated wrong expectation, this will change in the subsequent commit

Now the test fails due to bug #4413 since the manipulated wrong expectation was now corrected

Fix reproducer test case in RunCest#runHtmlCheckReport that failed in CI: adaption of expectation after copy&paste into "Case9"

Ref: Split up reproducer test case RunCest#runHtmlCheckReport into parameterized test based on @dataProvider

Try to improve output/report for @dataProvider based parameterization of reproducer test case RunCest#runHtmlCheckReport

- Workaround: Skip test for PHP 5.6, because this test fails due to another Codeception bug that only happens with PHP 5.6: the execution of single CEST test cases does not work

- Workaround: Skip test for PHP 5.6, because this test fails due to another Codeception bug that only happens with PHP 5.6: the execution of single CEST test cases does not work (without debug log)

- Give new test cases in CodeceptionIssue4413Cest meaningful names (keep references to original cases from #3410 in comments)
- In order to nicely assert for them being correctly printed in HTML report extract '\Codeception\Test\Descriptor::getTestCaseNameAsString'

- Fix newly extracted '\Codeception\Test\Descriptor::getTestCaseNameAsString' for PHP 5.6

Enhance 'wantTo' test case/scenario description as suggested by Naktibalda
Naktibalda added a commit that referenced this issue Nov 23, 2019
…ually check the HTML report!) based on new "html_report" test suite

Add HTML report "structure" checks based on regex created via builder pattern: note the test succeeds (with bug #4413) due to a manipulated wrong expectation, this will change in the subsequent commit

Now the test fails due to bug #4413 since the manipulated wrong expectation was now corrected

Fix reproducer test case in RunCest#runHtmlCheckReport that failed in CI: adaption of expectation after copy&paste into "Case9"

Ref: Split up reproducer test case RunCest#runHtmlCheckReport into parameterized test based on @dataProvider

Try to improve output/report for @dataProvider based parameterization of reproducer test case RunCest#runHtmlCheckReport

- Workaround: Skip test for PHP 5.6, because this test fails due to another Codeception bug that only happens with PHP 5.6: the execution of single CEST test cases does not work

- Workaround: Skip test for PHP 5.6, because this test fails due to another Codeception bug that only happens with PHP 5.6: the execution of single CEST test cases does not work (without debug log)

- Give new test cases in CodeceptionIssue4413Cest meaningful names (keep references to original cases from #3410 in comments)
- In order to nicely assert for them being correctly printed in HTML report extract '\Codeception\Test\Descriptor::getTestCaseNameAsString'

- Fix newly extracted '\Codeception\Test\Descriptor::getTestCaseNameAsString' for PHP 5.6

Enhance 'wantTo' test case/scenario description as suggested by Naktibalda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.