<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 测试吗?

      Can I Skip Junit Tests if other tests fail?(如果其他测试失败,我可以跳过 Junit 测试吗?)
      <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 测试吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                <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'>

                    <tbody id='pd6hX'></tbody>
                • <tfoot id='pd6hX'></tfoot>
                    • <legend id='pd6hX'><style id='pd6hX'><dir id='pd6hX'><q id='pd6hX'></q></dir></style></legend>

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