Using Junit test suite, we can run the test cases in Selenium Webriver.
Here is the sample snippet.
// Test class1
public class c1 {
@Test
public void one(){
System.out.println("one");
}
}
Here is the sample snippet.
// Test class1
public class c1 {
@Test
public void one(){
System.out.println("one");
}
}
//Test class 2
public class c2 {
@Test
public void two(){
System.out.println("two");
}
}
//JUnit suite
import junit.framework.Test;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@SuppressWarnings("unused")
@RunWith(Suite.class)
@SuiteClasses({c1.class, c2.class})
public class suite {
}
Hi,
ReplyDeleteHow to Write Logs in Selenium (Selenium RC and also in WebDriver) and where this has to be maintained in the Framework..
Thanks in Advance
These steps are same as configuring Junit in eclipse without selenium. Is it possible to configure the same using Maven. I mean Selenium and Junit working in sync using pom.xml.
ReplyDelete