当前位置:网站首页>Why can't I use the @test annotation after introducing JUnit

Why can't I use the @test annotation after introducing JUnit

2022-07-06 11:05:00 Pingguo stuffed with rice cakes

stay pom.xml The following are configured in the configuration file

<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.11</version>
  <scope>test</scope>
</dependency>

Found to be unusable @Test、@after wait

reason : Above scope Configured with Junit Available locations ,test Indicates that the src Under the test Only under the folder can you use .

solve : take <scope>test</scope> Delete it .

 

原网站

版权声明
本文为[Pingguo stuffed with rice cakes]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060912377323.html