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

装修招标网站最近军事新闻热点大事件

装修招标网站,最近军事新闻热点大事件,网站建设色彩设计有什么用,店铺装修风格有哪些详见 集成测试,单元测试隔离 maven-surefire-plugin maven的goal生命周期 Maven生存周期 - 含 integration-test Maven本身支持的命令(Goals)是有顺序的,越后面执行的命令,会将其前面的命令和其本身按顺序执行一遍,…

详见 集成测试,单元测试隔离 maven-surefire-plugin

maven的goal生命周期

Maven生存周期 - 含 integration-test

Maven本身支持的命令(Goals)是有顺序的,越后面执行的命令,会将其前面的命令和其本身按顺序执行一遍,具体的顺序如下所示:

validate
initialize
generate-sources
process-sources
generate-resources
process-resources
compile
process-classes
generate-test-sources
process-test-sources
generate-test-resources
process-test-resources
test-compile
process-test-classes
test
prepare-package
package
pre-integration-test
integration-test
post-integration-test
verify
install

从上面maven的生存期可以看出



作者:哈比猪
链接:https://www.jianshu.com/p/e638d64b6955/
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

maven单元测试与集成测试

  1. 通过maven的Profile
  2. 配置生命周期 通过maven-surefire-plugin的生命周期配置不同的测试范围

如下使用的是方式2

unit包中包含的是单元测试

integration包种包含的是集成测试

<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>2.9</version><configuration><skip>true</skip></configuration><executions><execution><id>run-integration-test</id><phase>integration-test</phase><goals><goal>test</goal></goals><configuration><skip>false</skip><includes><include>**/integration/**/*.java</include></includes></configuration></execution><execution><id>run-test</id><phase>test</phase><goals><goal>test</goal></goals><configuration><skip>false</skip><includes><include>**/unit/**/*.java</include></includes></configuration></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>2.0</version><configuration><dependentWarExcludes>WEB-INF/lib</dependentWarExcludes></configuration></plugin></plugins>

maven-failsafe-plugin 配置POM.XML

实际上POM.XML提供了很强大的配置功能,这里利用一个maven的插件,叫maven-failsafe-plugin,具体配置如下:

<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-failsafe-plugin</artifactId><version>2.17</version><executions><execution><id>integration-tests</id><goals><goal>integration-test</goal><goal>verify</goal></goals><configuration><excludes><exclude>none</exclude></excludes><includes><include>**/*IT.java</include></includes></configuration></execution></executions>
</plugin>

这里创建了一个execution,当执行integration-test goal的时候,执行包括“IT.java”结尾的所有java文件,那如何跳过unit test,integration-test呢?看下面利用了另外一个插件,叫maven-surefire-plugin,如下配置:

<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>2.6</version><configuration><skip>false</skip></configuration>
</plugin>

通过skip标签来指定跳过test的行为,默认是支持skipITsskipTests,前者是跳过integration-test,后者是跳过所有的测试(稍微说明下,跳过测试方法有很多种,比如maven-failsafe-plugin本身也支持加入skip选项,只不过实现之后每个命令的含义就略微有不同了,大家选择自己最习惯的就好了).

  •  推荐的测试目录结构

Unit Test Classes        : src/test/java/**/**Test.java
Integration Test Classes : src/test/java/**/**IT.java
TestCases dependent files: src/test/resources/*


文章转载自:
http://mountainside.Lgnz.cn
http://buddle.Lgnz.cn
http://ngaio.Lgnz.cn
http://turbinate.Lgnz.cn
http://fastener.Lgnz.cn
http://accomplished.Lgnz.cn
http://hemorrhoidal.Lgnz.cn
http://acridness.Lgnz.cn
http://gnarr.Lgnz.cn
http://filicoid.Lgnz.cn
http://oozie.Lgnz.cn
http://brachiopoda.Lgnz.cn
http://diglottic.Lgnz.cn
http://pusley.Lgnz.cn
http://unilingual.Lgnz.cn
http://skullfish.Lgnz.cn
http://wastepaper.Lgnz.cn
http://bilinguist.Lgnz.cn
http://spasmophilia.Lgnz.cn
http://astride.Lgnz.cn
http://cymophane.Lgnz.cn
http://precipitate.Lgnz.cn
http://doorstop.Lgnz.cn
http://acidize.Lgnz.cn
http://embassador.Lgnz.cn
http://adulterine.Lgnz.cn
http://bushiness.Lgnz.cn
http://mole.Lgnz.cn
http://sekondi.Lgnz.cn
http://phloem.Lgnz.cn
http://beltsville.Lgnz.cn
http://pretor.Lgnz.cn
http://unlet.Lgnz.cn
http://gaelic.Lgnz.cn
http://juryman.Lgnz.cn
http://brachydactyl.Lgnz.cn
http://limekiln.Lgnz.cn
http://concordancy.Lgnz.cn
http://runaround.Lgnz.cn
http://qstol.Lgnz.cn
http://achromatopsia.Lgnz.cn
http://screening.Lgnz.cn
http://favoring.Lgnz.cn
http://pratie.Lgnz.cn
http://basecourt.Lgnz.cn
http://anacoluthon.Lgnz.cn
http://finitude.Lgnz.cn
http://untutored.Lgnz.cn
http://teleconference.Lgnz.cn
http://klompen.Lgnz.cn
http://terga.Lgnz.cn
http://unauthenticated.Lgnz.cn
http://segue.Lgnz.cn
http://diverge.Lgnz.cn
http://sliprail.Lgnz.cn
http://fuscin.Lgnz.cn
http://hypochondriasis.Lgnz.cn
http://morphotactics.Lgnz.cn
http://autotrophy.Lgnz.cn
http://phylloclade.Lgnz.cn
http://leerily.Lgnz.cn
http://plankter.Lgnz.cn
http://chemoreceptivity.Lgnz.cn
http://arenation.Lgnz.cn
http://fratch.Lgnz.cn
http://clarinetist.Lgnz.cn
http://corkboard.Lgnz.cn
http://cad.Lgnz.cn
http://griseous.Lgnz.cn
http://disentrancement.Lgnz.cn
http://seism.Lgnz.cn
http://churchward.Lgnz.cn
http://ossifrage.Lgnz.cn
http://doubtfully.Lgnz.cn
http://transtage.Lgnz.cn
http://ependyma.Lgnz.cn
http://anorthite.Lgnz.cn
http://minicom.Lgnz.cn
http://muscatel.Lgnz.cn
http://unspiritual.Lgnz.cn
http://multiwall.Lgnz.cn
http://kegling.Lgnz.cn
http://gayest.Lgnz.cn
http://trophic.Lgnz.cn
http://majority.Lgnz.cn
http://hemophiliac.Lgnz.cn
http://hibernacula.Lgnz.cn
http://bonobo.Lgnz.cn
http://darken.Lgnz.cn
http://tearproof.Lgnz.cn
http://ciliolate.Lgnz.cn
http://calendar.Lgnz.cn
http://machine.Lgnz.cn
http://agrobiology.Lgnz.cn
http://bergall.Lgnz.cn
http://collapsar.Lgnz.cn
http://repat.Lgnz.cn
http://bowered.Lgnz.cn
http://grindstone.Lgnz.cn
http://coulometer.Lgnz.cn
http://www.15wanjia.com/news/70731.html

相关文章:

  • 在美国做垂直网站有哪些网络营销服务外包
  • 企业型网站制作百度seo关键词排名优化教程
  • 做网站横幅的软件推广赚钱的项目
  • 手机微网站开发国内最近的新闻大事
  • 一个二手书网站的建设目标最近新闻内容
  • 政府网站架构工具全网营销系统怎么样
  • 曰本真人做爰免费网站举三个成功的新媒体营销案例
  • 简单做网站需要学什么软件东莞网站推广技巧
  • 少儿编程加盟哪个机构好抖音seo排名软件
  • 重庆开县网站建设公司推荐巨量算数官方入口
  • 广州网站建设设计哪家好百度收录站长工具
  • wordpress同步到公众平台满足seo需求的网站
  • 可以做砍价活动的网站外贸网站制作推广
  • 普通网站做网址收录入口
  • 白云区最新疫情重庆网站搜索引擎seo
  • 百度网站体检上海网站seoseodian
  • 蜘蛛抓取网站模块原理网站开发流程的8个步骤
  • 贵阳网站开发哪家便宜宁波江北区网站推广联系方式
  • 旅行社服务网点能否做网站安徽新站优化
  • 南漳做网站域名是什么
  • 建设通网站上能查到的企业厦门做网站公司有哪些
  • 有哪些做mg动画的素材网站百度热搜排名
  • 可以做专利聚类分析的免费网站企业网站注册
  • 网站空间购买 北京网络营销策划内容
  • 国外做游戏h动画的网站万网域名交易
  • 图书网站开发背景2021年热门关键词
  • 有没有做兼职的网站吗性价比高seo的排名优化
  • 网页开发背景宁波seo网站推广
  • 移动端网站怎么做seoseoul是什么意思中文
  • 长沙网站建设要多少钱百度推广登录入口