当前位置:网站首页>引入了junit为什么还是用不了@Test注解
引入了junit为什么还是用不了@Test注解
2022-07-06 09:13:00 【萍果馅是年糕】
在pom.xml配置文件中配置了如下
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency>
发现无法使用@Test、@after等等

原因:上述scope配置了Junit可用的位置,test表示只能在src下的test文件夹下面才可以使用。
解决:将<scope>test</scope>删除就可以了。

边栏推荐
- February 13, 2022 - Maximum subarray and
- Install MySQL for Ubuntu 20.04
- Ubuntu 20.04 安装 MySQL
- [recommended by bloggers] C # generate a good-looking QR code (with source code)
- 报错解决 —— io.UnsupportedOperation: can‘t do nonzero end-relative seeks
- 01项目需求分析 (点餐系统)
- [reading notes] rewards efficient and privacy preserving federated deep learning
- Install mysql5.5 and mysql8.0 under windows at the same time
- API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
- CSDN问答模块标题推荐任务(一) —— 基本框架的搭建
猜你喜欢

MySQL主从复制、读写分离
![[reading notes] rewards efficient and privacy preserving federated deep learning](/img/c3/5e88277b5024885d5ceeaa0de14b27.jpg)
[reading notes] rewards efficient and privacy preserving federated deep learning

CSDN问答标签技能树(五) —— 云原生技能树

Just remember Balabala

Swagger, Yapi interface management service_ SE

Did you forget to register or load this tag 报错解决方法

MySQL22-逻辑架构
![[recommended by bloggers] C WinForm regularly sends email (with source code)](/img/5d/57f8599a4f02c569c6c3f4bcb8b739.png)
[recommended by bloggers] C WinForm regularly sends email (with source code)

MySQL 20 MySQL data directory

Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
随机推荐
CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
【博主推荐】SSM框架的后台管理系统(附源码)
软件测试-面试题分享
解决:log4j:WARN Please initialize the log4j system properly.
Mysql25 index creation and design principles
Kubesphere - deploy the actual combat with the deployment file (3)
MySQL主從複制、讀寫分離
JDBC principle
MySQL other hosts cannot connect to the local database
CSDN问答模块标题推荐任务(一) —— 基本框架的搭建
[recommended by bloggers] background management system of SSM framework (with source code)
【博主推荐】C# Winform定时发送邮箱(附源码)
MySQL21-用戶與權限管理
Postman environment variable settings
MySQL24-索引的数据结构
CSDN question and answer tag skill tree (I) -- Construction of basic framework
Discriminant model: a discriminant model creation framework log linear model
35 is not a stumbling block in the career of programmers
JDBC原理
报错解决 —— io.UnsupportedOperation: can‘t do nonzero end-relative seeks