Problem when build test with Eclipse/Maven/TestNG, NoClassDefFoundError
So I've tried and I've tried for a week now but I can't get it to work. I'm sorry. I've red many FAQs here on launchpad, but I really cant get it to work. Heres is my problem:
I have a Maven project in Eclipse with TestNG and Sikuli. When I run the test as Run as -> TestNG Test it works just fine. But when i run the test as Run as -> Maven test, I get this error: java.lang.
Here is some info regarding config etc etc:
Sikuli version = SikuliX Setup Build: 1.0.1
And here is how my Java environment looks like:
Java version:
C:\Sikuli X>java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)
Java installed under:
C:\Program Files (x86)\Java\
Path looks like this:
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoo
%SIKULI_HOME% = C:\Sikuli X\Sikuli-IDE
%JAVA_HOME% = C:\Program Files (x86)\Java\
Here is my configuration in Eclipse:
Test-case
package com.KvadratTest
import org.testng.Assert;
import org.testng.
public class NewTest {
@Test
public void LoginValidUser() {
LoginPage lp = new LoginPage();
boolean vs = lp.ValidUser(
Assert.
}
}
Test-class
package com.KvadratTest
import org.sikuli.
import org.sikuli.
import org.sikuli.
import org.sikuli.
import org.sikuli.
public class LoginPage {
private Screen _s;
private String NPath = "C:\\Users\
public LoginPage()
{
Screen s = new Screen();
this._s = s;
}
public Boolean ValidUser(String user, String password)
{
try
{
App.
_s.
_s.type(user);
_s.
_s.
_s.
_s.
_s.
_s.
_s.
_s.
return true;
}
catch(
{
e.printStack
}
return false;
}
Error in Maven Console:
[ERROR] Failed to execute goal org.apache.
So I really need help with this, I'm stuck :(
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- DH
- Solved:
- Last query:
- Last reply: