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

[Cest] last test in file is skipped if some test has invalid dependency #4598

Closed
Naktibalda opened this Issue Nov 2, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@Naktibalda
Member

Naktibalda commented Nov 2, 2017

Example code:

class DebugIssueCest
{
    /**
     * @depends test5
     */
    public function test1(\FunctionalTester $I){}

    public function test2(\FunctionalTester $I){}

    public function test3(\FunctionalTester $I){}
}

test3 has no dependencies, so it is expected that running it alone should execute the test,
but it is skipped.

$ codecept run tests/functional/DebugIssueCest.php:test3 -vv
....
Functional Tests (1) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Modules: \Helper\Functional, REST, PhpBrowser
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Testing functional
DebugIssueCest: Test3
Signature: DebugIssueCest:test3
Test: tests/functional/DebugIssueCest.php:test3
Scenario --
 SKIPPED: Dependent test for test5 not found
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Nov 2, 2017

Member

It is a fault of \Codeception\Suite::findMatchedTest.

I think that instead of skipping the last test it should throw an exception.

Member

Naktibalda commented Nov 2, 2017

It is a fault of \Codeception\Suite::findMatchedTest.

I think that instead of skipping the last test it should throw an exception.

Naktibalda added a commit that referenced this issue Nov 2, 2017

DavertMik added a commit that referenced this issue Nov 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment