Junit/selenium adapter Error
I'm trying to run Test cases using Junit/selenium adapter. I get these error below in my Results.
com.ibm.dashboard.AutomationMain:initializationError() java.lang.Exception: No runnable methods at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:169) at Not sure about the values that need to be entered in Test Class, Class path fields? Can some one please help me? |
2 answers
Aparna,
If you have a moment, take a quick look at this article
https://jazz.net/library/article/755
..its a great overview on running JUnit tests in RQM
Comments
Aparna Sukumaran
commented Apr 01 '14, 6:33 p.m.
I'm getting the error below, after following all the steps from the Article. Any recommendations to fix this error.
at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.ibm.rqm.adapter.commandline.JUnitLauncher.main(JUnitLauncher.java:115)
Brian Lahaie
commented Aug 17 '15, 3:49 p.m.
I am having a similar issue.
|
I was getting the same error but I was able to resolve it by:
(1)Adding these import statements to my script: import org.junit.Before;
annotations
import org.junit.Test;
(2)Added these JUnit annotations to my script: @Before @Test Comments After working more with RQM and Selenium I found these annotations to be more useful, @BeforeClass, @Test, and @AfterClass. These import statements are needed to use these annotations:
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
As stated below, I was getting the same error but I was able to resolve it by:
(1)Adding these import statements to my script:
import org.junit.Before;
(2)Added these JUnit annotations to my script:
@Before
@Test
import java.io.File;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.junit.Before;
import org.junit.Test;
public class MyClass {
public WebDriver driver;
@Before
public void setUp()throws Exception{
driver = new FirefoxDriver();
}
@Test
public void myTest() throws Exception{
driver.get("http://www.ibm.com");
String i = driver.getCurrentUrl();
System.out.println(i);
MyClass me = new MyClass();
driver.close();
}
}