-
Notifications
You must be signed in to change notification settings - Fork 610
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
Running tests by specifying one or more line numbers returns no specifications found #731
Comments
any more information? folder structure? config file? |
You could use tags to tag the scenario(s) you want to run and then just: |
I'm a big fan of this feature, thanks for the workaround @janipalsamaki. |
I may have misunderstood the bug but "running tests by specifying one or more line numbers" works for me on Behat v3.0.15.
|
I'm closing this issue as it is seems to be very old and might as well have been fixed. Please reopen with updated stats if that's not the case! |
Actually, this is broken for me as well. Running it like this works fine.. But when I set line numbers it fails, I even tried a large range to see if I was off.. This gives error:
Here's a list of the versions I'm running..
|
Coule you try with gherkin cache disabled ?
|
Still no dice .. Were does the line number processing happen? Tracing the code to Behat\Behat\Gherkin\Specification\Locator\ FilesystemFeatureLocator::findFeatureFiles() which is looking if the entire string is an actual file or directory. Note that I'm using the dev-master branch of behat ( all my versions are posted above) |
I'm seeing this locally now as well. I can only run all tests at once by not specifying paths at all. |
Note that this issue is specific to line numbers for us. We can run a specific file without any issue using our versions. |
I have the same problem with line number:
Thanks to @janipalsamaki for hint. My components:
|
I could be crazy but it looks like your Scenario is on line 12? |
@ciaranmcnulty thanks for notice. The scenario is indeed in line 12, but it still fails on the line 12. |
@slash3b It says that the scenario defined on line 13 has failed and that is because of this step |
actually, according to the output you pasted, it is on line 13, not on line 12:
(note that I hard-wrapped the output to make the snippet more readable) |
@jakubzapletal thank you, you are right the line with "And I follow "edit-field-department-und" is not correct. Ok, but the first scenario is fine and I did test it one more time (other scenarios were deleted) and still have the same . ha, @stof is right, the scenario is on the 13-th line, on the first line of application.feature file I have |
Just answering this old question since I was also looking for this information while investigating a different issue and stumbled upon this issue. I hope this might help people searching for this information in the future.
The splitting of a locator like |
I recently updated to Behat v3.0.15 (from 2.5.3) and now when I try to run tests by specifying one or more line numbers, I get
Behat\Testwork\Tester\Exception\WrongPathsException
: No specifications found at path. When I add the--dry-run
flag, it is able to find the scenario by line number just fine.I think I've traced it to a problem in Behat\Testwork\Tester\Runtime\RuntimeSuiteTester.php:test() where the $iterator successfully runs through the foreach function when the
--dry-run
flag is on, but the foreach does not run without that flag. I think that means that the GroupedSpecificationIterator doesn't have any specs when it should...?Please help. Not being able to run scenarios one at a time when debugging is going to really slow down development. Thanks!
The text was updated successfully, but these errors were encountered: