org.testng.annotations doesn't exist

5,620 views
Skip to first unread message

Diego Perez

unread,
Dec 6, 2010, 6:59:18 AM12/6/10
to Mario Competition
Hello again,

I am trying to compile the benchmark 0.1.9, but I have the following
errors when trying to do so:

"package org.testng.annotations does not exist"

(18 errors, in all the Java classes inside the folder src\ch\idsia
\unittests\)

I've searched for the package and obviously I couldn't find it, both
in the code and in the JAR library files. Am I missing something?
Should I get those files from another site?

Thanks,
Diego.

Erek Speed

unread,
Dec 6, 2010, 7:13:22 AM12/6/10
to mariocom...@googlegroups.com
Hi Diego,

Are you using IntelliJ IDEA? I have this problem as well when using
that IDE. I'm not sure about other IDEs.

Here's the fix for IDEA:
1. Go to: File>Project Structure
2. Under Project Settings select, "Libraries"
3. In the middle pane, select "lib"
4. In the right pane, select, "Attach Jar Directories..."
5. Select, "<Program Files>\JetBrains\IntelliJ IDEA Community Edition
<version>\plugins\testng\lib"
6. Done!

If you're using something else, there should be a similar way to add a
dependency. Ask and I'll see if I can help.

Cheers,
Erek

Diego Perez

unread,
Dec 6, 2010, 7:29:23 AM12/6/10
to mariocom...@googlegroups.com
Hi Erek,

Thanks a lot for you answer, I didn't know about these libraries. 

I am using Netbeans, but I could make it work by downloading the libraries and attaching them.
In case somebody needs this too, to attach them just use the normal procedure to attach Jar files in Netbeans:

1. Project -> Properties.
2. Select Category 'Libraries', tab 'Compile'
3. Click on JAR/Folder and add the (3) Jar files located in '\IntelliJ IDEA Community Edition <VERSION>\plugins\testng\lib\'.

Thanks again,
Diego.
Reply all
Reply to author
Forward
0 new messages