#Java JUnit testing

13 messages · Page 1 of 1 (latest)

lost sleet
#

Hey guys, im trying to import the org.junit.jupiter.api.Test; etc...
But its giving me an error in visual studio code, does anyone knows why?

spiral jettyBOT
#

This post has been reserved for your question.

Hey @lost sleet! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

ebon sand
#

I mean, you didn't even tell what errors. But from the screenshot it looks like VSC isn't aware that junit exists

#

You would normally need to get the jar of junit and whatever its dependencies are, then make your project aware of these jars in whatever way VSC offers for that.

It's usually easier to deal with that kind of things with maven or gradle so you don't have to go find external jars yourself. But I don't know what it takes to make them work with VSC

lost sleet
#

i have another java file inside tmp folder, and the tests are good, no errors

#

junit-console.jar is in the big folder TP4

ebon sand
#

It looks like for whatever reasons, these two folders don't use the same external .jars.
I'd wonder for example why they have different icons.

But someone who uses VSC would be more helpful than me from here

lost sleet
#

thank you

spiral jettyBOT
# lost sleet thank you

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.