How to know the version of JUnit in Eclipse

前端 未结 7 845
甜味超标
甜味超标 2021-01-11 18:55

In eclipse:

  1. Window --> Preferences
  2. Expand Java at left side of panel --> JUnit is there under Java

How can I know the version of JUnit

7条回答
  •  终归单人心
    2021-01-11 19:33

    If you are cloned existing maven project and you want to check on which version your tests will run then you can check Junit version in you pom.xml file.

    If you print your junit version from code then it will print from your maven repository i.e. the version present in your pom.xml

    import junit.runner.Version;
    System.out.println("Version="+Version.id()); 
    

提交回复
热议问题