-1

I put this library: import org.apache.commons.io.FileUtils; but it sends an error The import org.apache.commons.io cannot be resolved what library is equivalent exist for Junit?

2

I think you are confusing somethings.

  • You are using a programming language called Java.
  • You are using a testrunner library called JUnit, which is a Java Package called org.junit
  • org.apache.commons.io.FileUtils is also Java Package.

So you are programming tests in Java, so you can use all Java packages. So there is not an equivalent for JUnit, as that doesnt make sense. Just use apache.commons package next to JUnit.

Now you are missing the Apache Commons package, which can be downloaded here: https://commons.apache.org/proper/commons-io/download_io.cgi

I am not a Java expert, but here is a suggestion how to start using it:

the easiest way is to download jar file for ...commons.io and place it in lib folder in your project (or somewhere else) and then add to your build path from project properties page using Add JARs... (or Add external JARs... when jar is placed outside your workspace)

https://www.eclipse.org/forums/index.php/t/63338/

Your question is not really a testing question, but a Java programming question: How can I use this Java Package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.