How to know which version of JUnit do I have installed on my PC?
Second question- How do I upgrade it?
This will print the version of jUnit.
java -cp <path-to-junit-folder>/junit.jar junit.runner.Version
The version that you are running depends on the classpath of the running application. It's possible to have multiple versions on the same machine, but if this is in question you can just write a test for it:
import junit.runner.Version;
class SomeTests {
void testJUnitVersion() {
assertEquals("4.8.2", Version.id());
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With