英文:
How to categorize test case failures in jenkins logs
问题
我正在使用Jenkins流水线作业来运行自动化脚本。
我正在生成文本和HTML格式的报告。
我们有500多个测试用例,并且在Jenkins作业成功完成后,我们会得到通过和失败的测试用例数量。
由于测试用例数量庞大,分析失败情况非常繁琐。
有没有办法对这些失败进行分类,并得到失败的摘要?例如:由于元素未找到异常导致的失败次数等等?
英文:
I am using jenkins pipeline job for running automation scripts.
I am generating a report in text and html format.
We have a test case count of 500+ test cases and post successful jenkins job completion we get a count of passed and failed test cases.
Due to a huge count of test cases it is a very cumbersome task to analyse the failures.
Is there any way to categorize these failures and get a summary of the failures? For eg: x count of failures due to element not found exception, etc?
答案1
得分: 1
为了替代使用自然语言处理(NLP)和人工智能(AI)来对故障信息进行分类和聚类,为什么不尝试通过逻辑方式组织测试用例呢?例如,你可以将模块A的测试放在tests/tests_module_a/
目录下,将模块B的测试放在tests/tests_module_b/
目录下,以此类推。这样,当你运行测试时,你可以获得测试的概览以及哪些测试失败了。
使用pytest-cov,你可以生成覆盖率报告,例如XML格式,并将其用于进一步的分析。
此外,如果你有500个以上的测试用例,将应用程序进行拆分可能是明智的选择。
英文:
Instead of using NLP and AI to classify and cluster the text from failure messages, why not try to organize test cases logically? So you would group tests for module A in tests/tests_module_a/
, tests for module B in tests/tests_module_b/
and so on. Then when you run your tests you get an overview of the tests and which ones failed.
With pytest-cov you can have a coverage report generated, e.g. as xml and use this for your further analysis.
Furthermore, if you have 500+ test cases it might be wise to start splitting the application.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论