[英]CI/CD Junit tests: should I build the package first or I can run the test firsts?
Regarding a pipeline of CI/CD when you want to run all the junit tests from the pipeline you should build first the code and then run the tests or you can first run the tests and if they pass run the build?关于 CI/CD 的管道,当您想从管道运行所有 junit 测试时,您应该首先构建代码然后运行测试,或者您可以先运行测试,如果它们通过运行构建?
Steps:脚步:
Is this the order?这是命令吗?
Consider a classic environment with Maven where you run mvnw test
to run the tests.考虑一个带有 Maven 的经典环境,您可以在其中运行mvnw test
来运行测试。
I am asking this because for example in this video , there is first the build step and then the test step我问这个是因为例如在这个视频中,首先是构建步骤,然后是测试步骤
I answer myself: to run tests for compiled languages (Java, C++, etc) you need to build first.我回答自己:要运行编译语言(Java、C++ 等)的测试,您需要先构建。
For interpreted languages that doens't need compilation you can simply run tests对于不需要编译的解释语言,您可以简单地运行测试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.