You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a cucumber feature file.
Create a Step Definitions file
Create a Runner test file using Junit
But when I run the Runner file , it shows all tests are passed but when I click on any of the test it shows the error "Test class not found in selected project".
The text was updated successfully, but these errors were encountered:
ratelz
changed the title
Test runner class not found in selected project
Test runner class not found in selected project in Cucumber
Jan 26, 2022
You're using cucumber-junit which integrates Cucumber with JUnit 4. This means that you are using the JUnit Plugin for Eclipse, not the Cucumber plugin.
While JUnit 4 no longer requires tests to be classes most tools still assume this is the case because JUnit 4 does not provide a way for Cucumber to specify if the test file is a class or something else. So I would consider it unlikely that this bug will be fixed by the Eclipse team.
With JUnit 5, JUnit does provide a way for Cucumber to communicate that the test files are files and where they are located. Though the JUnit Eclipse Plugin is equally unable to handle this. Still I would consider it possible that this bug will be fixed by the Eclipse team. So consider switching to JUnit 5 with the cucumber-junit-platform-engine and file a bug report with the Eclipse Team.
Issue:
Test class not found in selected project
Steps to recreate:
Create a cucumber feature file.
Create a Step Definitions file
Create a Runner test file using Junit
But when I run the Runner file , it shows all tests are passed but when I click on any of the test it shows the error "Test class not found in selected project".
The text was updated successfully, but these errors were encountered: