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
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".
For example Below is my feature file:
Feature: Select Site
<<<
In order to Tableau select site
As a user
I want to choose a Tableau Site to generate reports
Scenario Outline: Verify if Tableau allows user to select a Site
Given user navigates to Tableau Site Page
When user validates the homepage title
Then user will click on search box
And user will enter the search string
| |
Then user user will select the site
| |
And user will successfully reach to home page
Examples:
| searchSite | selectSite |
| Test1 | Test1 |
Below is my Step Definition file for the same
<<<
package StepDefinitions;
public class SelectSiteStep
{ @given("^user navigates to Tableau Site Page$")
public void user_navigates_to_tableau_site_page() throws Throwable{
// Write code here that turns the phrase above into concrete actions
System.out.println("user navigates to Tableau Site page");
}
@Then("^user will click on search box$")
public void user_will_click_on_search_box() throws Throwable{
// Write code here that turns the phrase above into concrete actions
System.out.println("user will click on search box");
}
@Then("^user will senter the search string$")
public void user_will_senter_the_search_string(String searchSite) throws Throwable{
System.out.println("user will senter the search string "+searchSite);
}
@Then("^user user will select the site$")
public void user_user_will_select_the_site(String selectSite) throws Throwable{
System.out.println("user user will select the site "+selectSite);
}
@Then("^user will succesfully reach to home page$")
public void user_will_succesfully_reach_to_home_page() throws Throwable{
// Write code here that turns the phrase above into concrete actions
}
}
Below is my Test runner file
<<<
package com.web.automation.base;
Issue:
Test class not found in selected project
Steps to recreate:
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".
For example Below is my feature file:
Feature: Select Site
<<<
In order to Tableau select site
As a user
I want to choose a Tableau Site to generate reports
Scenario Outline: Verify if Tableau allows user to select a Site
Given user navigates to Tableau Site Page
When user validates the homepage title
Then user will click on search box
And user will enter the search string
| |
Then user user will select the site
| |
And user will successfully reach to home page
Examples:
| searchSite | selectSite |
| Test1 | Test1 |
Below is my Step Definition file for the same
<<<
package StepDefinitions;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
public class SelectSiteStep
{
@given("^user navigates to Tableau Site Page$")
public void user_navigates_to_tableau_site_page() throws Throwable{
// Write code here that turns the phrase above into concrete actions
System.out.println("user navigates to Tableau Site page");
}
}
Below is my Test runner file
<<<
package com.web.automation.base;
import org.junit.runner.RunWith;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
@RunWith(Cucumber.class)
@CucumberOptions
(
features = {"src/test/java/Features"},
glue = {"StepDefinitions"},
monochrome = true,
plugin={"junit:reports/junit/reports.xml",
"pretty:target/cucumber-pretty.text",
"html:target/cucumber-html-report",
"json:target/cucumber.json",
"usage:target/cucumber-usage.json",}
)
public class TestRunner
{
}
Please let me know why I'm seeing that error "Test class not found in selected project".
The text was updated successfully, but these errors were encountered: