Forum Discussion

bgran05's avatar
bgran05
Occasional Contributor
8 years ago

How to refer to single unit test names for Selenium tests?

Hello, I followed the tutorial here to integrate my Selenium tests using Maven.

 

https://support.smartbear.com/testcomplete/docs/working-with/integration/with-selenium/overview.html

 

I have two classes: FirstTestCase (stored in FirstTestCase.java) and ScenarioTest. They are in the same Java package, and my .pom file was used for both of them.

 

There is one test in FirstTestCase, login.

 

Here is the stucture:

 

public class FirstTestCase {
...

@BeforeClass
public static void setUp(){
...
}

test

public void login(){

}

 

How do I refer to in the JUnit prompt in SmartBear (Run the following test cases dialog, Step 3: Configure the project item to run your Selenium test), so that only FirstTestCase login test is run, but none of the tests from ScenarioTest.java are run?

 

I have tried to write in "FirstTestCase.login", but TestComplete says it cannot find that test. I am able to use the Run All Tests option, but that runs the test in FirstTestCase and ScenarioTest.

 

Thank you!

  • I found the answer. You refer to it as packagename.classname

     

    In my scenario, it would be packagename.FirstTestCase

  • bgran05's avatar
    bgran05
    Occasional Contributor

    I found the answer. You refer to it as packagename.classname

     

    In my scenario, it would be packagename.FirstTestCase