<bdo id='ebBN2'></bdo><ul id='ebBN2'></ul>

      <tfoot id='ebBN2'></tfoot>

      <small id='ebBN2'></small><noframes id='ebBN2'>

    1. <i id='ebBN2'><tr id='ebBN2'><dt id='ebBN2'><q id='ebBN2'><span id='ebBN2'><b id='ebBN2'><form id='ebBN2'><ins id='ebBN2'></ins><ul id='ebBN2'></ul><sub id='ebBN2'></sub></form><legend id='ebBN2'></legend><bdo id='ebBN2'><pre id='ebBN2'><center id='ebBN2'></center></pre></bdo></b><th id='ebBN2'></th></span></q></dt></tr></i><div id='ebBN2'><tfoot id='ebBN2'></tfoot><dl id='ebBN2'><fieldset id='ebBN2'></fieldset></dl></div>

    2. <legend id='ebBN2'><style id='ebBN2'><dir id='ebBN2'><q id='ebBN2'></q></dir></style></legend>

      如果其他测试失败,我可以跳过 Junit 测试吗?

      时间:2023-05-28
      <i id='Ru7fc'><tr id='Ru7fc'><dt id='Ru7fc'><q id='Ru7fc'><span id='Ru7fc'><b id='Ru7fc'><form id='Ru7fc'><ins id='Ru7fc'></ins><ul id='Ru7fc'></ul><sub id='Ru7fc'></sub></form><legend id='Ru7fc'></legend><bdo id='Ru7fc'><pre id='Ru7fc'><center id='Ru7fc'></center></pre></bdo></b><th id='Ru7fc'></th></span></q></dt></tr></i><div id='Ru7fc'><tfoot id='Ru7fc'></tfoot><dl id='Ru7fc'><fieldset id='Ru7fc'></fieldset></dl></div>

      <small id='Ru7fc'></small><noframes id='Ru7fc'>

      • <bdo id='Ru7fc'></bdo><ul id='Ru7fc'></ul>
        <legend id='Ru7fc'><style id='Ru7fc'><dir id='Ru7fc'><q id='Ru7fc'></q></dir></style></legend>

        <tfoot id='Ru7fc'></tfoot>
                <tbody id='Ru7fc'></tbody>

                本文介绍了如果其他测试失败,我可以跳过 Junit 测试吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 Junit 通过 Seleniun WebDriver 运行测试.我正在尝试将我的测试分成功能区域以便更好地报告错误.我创建了测试来测试页面加载/将文档移动到其他工作流程.如果页面加载测试失败,或者工作流程移动失败,我想跳过后续的页面/工作流程测试.

                I'm using Junit to run tests with Seleniun WebDriver. I'm trying to split up my tests into function area for better error reporting. I've created tests to test Page load/moving documents to other workflows. If a page load test fails, or a workflow move fails I want to skip the subsequent page/workflow tests.

                如果测试 A 失败,我如何跳过班级中的其余测试或在班级 B 中运行测试?

                if a Test A fails how can I skip either the rest of the tests in the class or running tests in Class B?

                注意:我意识到我要问的是UNIT TESTS 的不好的做法*".但是,我实际上将 Junit 用于 Integration 和/或 Automation 测试.(取决于您的定义.)我已经找到 @Suite.SuiteClasses@FixMethodOrder 来订购我的测试类和测试方法.我试图命令它们在逻辑上运行,首先测试页面加载,然后将页面的每个功能作为单独的测试.一些功能,将信息移动到其他页面,意味着其他类.我的 1 节课可能需要 1/2 多小时才能完成.如果 pre-req 测试失败,我想短路依赖"测试,以便更快地得到我的结果/报告.

                NOTE: I realize what I'm asking is "bad Practice* for UNIT TESTS. However, I'm actually using Junit for Integration and/or Automation Testing. (Depending on your definition.) I've already found @Suite.SuiteClasses, and @FixMethodOrder to order my test classes and test methods. I'm trying to order them to run logically, testing the page load, first, then each feature of the page as a seperate test. Some of the features, move the information to other pages, meanining other classes. 1 of my classes can take over 1/2 hour to finish. If the pre-req tests fail, I'd like to short circuite the "Dependent" tests, in order to get my results/report sooner.

                推荐答案

                我建议你切换到TestNG.检查this.

                I suggest you switching to TestNG. Check this out.

                顺便说一句:当我使用 Java 工作时 - 差不多一年前 - 我没有为 JUnit 找到这样的解决方案.

                Btw:When I used to work with Java - almost one year ago - I didn't find such a solution for JUnit.

                这篇关于如果其他测试失败,我可以跳过 Junit 测试吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:当我尝试通过使用 Selenium RC 单击提交按钮进入下一页时,在 30000 毫秒后超时 下一篇:maven pom.xml 如何识别非标准项目结构中的 testng 测试用例?

                相关文章

                <i id='pd6hX'><tr id='pd6hX'><dt id='pd6hX'><q id='pd6hX'><span id='pd6hX'><b id='pd6hX'><form id='pd6hX'><ins id='pd6hX'></ins><ul id='pd6hX'></ul><sub id='pd6hX'></sub></form><legend id='pd6hX'></legend><bdo id='pd6hX'><pre id='pd6hX'><center id='pd6hX'></center></pre></bdo></b><th id='pd6hX'></th></span></q></dt></tr></i><div id='pd6hX'><tfoot id='pd6hX'></tfoot><dl id='pd6hX'><fieldset id='pd6hX'></fieldset></dl></div>

                <small id='pd6hX'></small><noframes id='pd6hX'>

              1. <tfoot id='pd6hX'></tfoot>
                1. <legend id='pd6hX'><style id='pd6hX'><dir id='pd6hX'><q id='pd6hX'></q></dir></style></legend>
                      <bdo id='pd6hX'></bdo><ul id='pd6hX'></ul>