当任何测试失败时,Cucumber-Jvm会生成空的Json文件 [英] Cucumber-Jvm produces empty Json file when any of the test Fails

查看:113
本文介绍了当任何测试失败时,Cucumber-Jvm会生成空的Json文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Jenkin Server上运行大约50个功能文件,它生成.JSON文件,该文件将被送入Cucumber Pie图表生成器.

I have about 50 feature files running on Jenkin Server and it produces .JSON file which will be fed into Cucumber Pie chart generator.

Jenkin在所有测试"均成功时生成文件,并生成饼图.

Jenkin produces file when All Tests Succeeds, and produces Pie chart as well

任何测试步骤失败时,它将生成大小为零的文件(空文件)

When any of the Test Step fails , It generates file with zero size (empty file)

我的项目是使用surefire插件设置的...我不知道这是否重要...

My project is setup using surefire plug in...I dont know if that matters...

谢谢

推荐答案

黄瓜退出的方式.....

The Way Cucumber exits.....

//System.exit(stats.hadErrors()|| stats.hadFailures()?1:0);

//System.exit(stats.hadErrors() || stats.hadFailures() ? 1 : 0);

System.exit(0);

System.exit(0);

这篇关于当任何测试失败时,Cucumber-Jvm会生成空的Json文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆