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

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

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

Comments

@Naktibalda
Copy link
Member

@Naktibalda 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
Copy link
Member Author

@Naktibalda 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
Fixes #4598
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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.