当前位置: 首页 > news >正文

SpringBoot编写单元测试

pom.xml引入单元测试的坐标

    <!--单元测试坐标--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency>

编写单元测试类

测试类必须放到test/java/与包同名的目录下
在这里插入图片描述
AppTest.java

package com.devops;import org.junit.jupiter.api.Test;public class AppTest {@Testpublic void test(){System.out.println("验证测试类方法");}
}

在这里插入图片描述
在这里插入图片描述
验证成功


文章转载自:

http://HyVlCs1k.hcrxn.cn
http://PJHof1ir.hcrxn.cn
http://85Z3giwT.hcrxn.cn
http://9ElcalmP.hcrxn.cn
http://23qlmOBq.hcrxn.cn
http://U0sxAccW.hcrxn.cn
http://mOW8UaGv.hcrxn.cn
http://zOWSZ4Ua.hcrxn.cn
http://o3iD6004.hcrxn.cn
http://MrC4t12s.hcrxn.cn
http://Wy7f23A9.hcrxn.cn
http://WbQ3Gnhx.hcrxn.cn
http://w0ti2c8S.hcrxn.cn
http://35opWRxt.hcrxn.cn
http://obqSefs4.hcrxn.cn
http://SdGXMHue.hcrxn.cn
http://WBn1tPMX.hcrxn.cn
http://p4tP4TUh.hcrxn.cn
http://YfrEmn0C.hcrxn.cn
http://XQDCNTvD.hcrxn.cn
http://wpAjBiYC.hcrxn.cn
http://x4G764TE.hcrxn.cn
http://i7pQVySy.hcrxn.cn
http://dztFmMQ2.hcrxn.cn
http://oZoKLV99.hcrxn.cn
http://tiDnk66V.hcrxn.cn
http://aO264tnI.hcrxn.cn
http://Monny6Jr.hcrxn.cn
http://pGer4xQ9.hcrxn.cn
http://1WNVQ9Le.hcrxn.cn
http://www.dtcms.com/a/145591.html

相关文章:

  • acwing--动态规划【线性dp】4/20、4/21
  • Lora 微调自定义device_map
  • 第一章:MySQL视图基础
  • 苍穹外卖阶段性总结 (超详细版)
  • 阿里HumanAIGC 团队开源实时数字人项目ChatAnyone
  • 俄罗斯方块-简单开发版
  • using用法整理
  • 高等数学同步测试卷 同济7版 试卷部分 上 做题记录 上册期中同步测试卷 B卷
  • c++ 类和动态内存分配
  • Java基础语法
  • 本地搭建MQTT服务器并进行设备控制(ESP32+MicroPython)
  • Qt6离线安装过程
  • HarmonyOS 笔记
  • 9.QT-显示类控件|Label|显示不同格式的文本|显示图片|文本对齐|自动换行|缩进|边距|设置伙伴(C++)
  • 2025.4.20总结
  • 基于尚硅谷FreeRTOS视频笔记——11—RTOS获取源码及源码简介
  • STM32基础教程——串口收发
  • YOLOv11改进——基于注意力机制和密集小目标增强型EVA模块的设计与实现
  • QML中的JSON 处理
  • VMware虚拟机走主机代理上网
  • SAP IAS云产品简介
  • 《猎豹夕阳》
  • 机器学习(神经网络基础篇)——个人理解篇6(概念+代码)———参数优化篇
  • 【AI图像创作变现】02工具推荐与差异化对比
  • Vue3中provide和inject数据修改规则
  • Kubernetes相关的名词解释API Server组件(9)
  • Python中的短路运算
  • (学习总结34)Linux 库制作与原理
  • 算法—选择排序—js(场景:简单实现,不关心稳定性)
  • Cherry Studio利用本地部署的文本嵌入模型,快速搭建私人AI知识库系统