test-suite

Is there a way to force Maven Surefire or JUnit to indicate the name of the failing test class when executed from a Test Suite?

纵然是瞬间 提交于 2019-12-12 10:50:15
问题 My question: Is there a way to force Maven Surefire (or JUnit?) to indicate the name of the failing test class when this class has been executed from a Test Suite? Now, the long story. Imagine you have a JUnit test suite that launches two JUnit tests. Examples of test classes: public class TestOne { @Test public void foo() { assertTrue(false); } @Test public void bar() { assertTrue(false); } } @UnitTest public class TestTwo { @Test public void foo() { assertFalse(true); } } and the test suite

phpunit throwing exception when doesn't find file with name of testsuite

扶醉桌前 提交于 2019-12-12 03:13:51
问题 I was following Jon´s screencast about Unit Testing with PhpUnit and ZF when I got the exact same error that ratzip described in this question. As he commented, I also had the same problem even after creating tests as suggested here: for some reason, there was some script looking for a file named as I named my test suite (MyApp.php or whatever...). I looked around but wasn´t able to find where I should create this file and what it should contains. But, in a given moment, after had read this

How to create appium TestSuite in Android Studio

只谈情不闲聊 提交于 2019-12-12 01:48:43
问题 I have created test stub using Appium in android studio. Now I want to create test suite so that I can manage my test cases. Could anyone help me how to create test suite for appium test cases? My AppiumTest.java contains public class AndroidAppiumTest { private AppiumDriver wd; @Before public void setUp() throws Exception { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName","Android"); capabilities.setCapability("appium-version", "1.0");

JUnit4 test case won't continue

北战南征 提交于 2019-12-11 19:17:40
问题 I created a test suite with 2 test cases using Selenium IDE. I exported the suite as Java/JUnit4/WebDriver. the first test case allow user to log-in the site, do a member search after the match is found, access the member's profile the second test case: once in the member profile, click on the link 'donation' to add a pledge. The test suite runs fine in Selenium IDE, but it hang up in Eclipse when I executed the suite. behavior in Eclipse, the first test case runs fine, the 2nd case opens up

TFS Test Plans Merge from different Projects

淺唱寂寞╮ 提交于 2019-12-11 18:06:59
问题 I would like to merge an existing MTP (Master Test Plan) defined as a Test Suite with subfolders and TestCases, into another MTP (same structured), but located in a different project in TFS2017. The idea is to have both project sharing the same MTP, so any change can be visible in both projects. By now, I've just seen the existing possibilities about cloning/copying test cases between different test suites, but all of them should be part of the same project. I guess there must be an easy way

Minitest - A test suite with method-level granularity

假如想象 提交于 2019-12-11 09:07:20
问题 After an upgrade, I'm finding the same several test methods failing, so I'd like to automate testing just those instead of all methods in all classes. I want to list each class-method pair (e.g. TestBlogPosts.test_publish , TestUsers.test_signup ) and have them run together as a test suite. Either in a file or on the command-line, I don't really care. I'm aware of these techniques to run several entire classes, but I'm looking for finer granularity here. (Similar to what -n /pattern/ does on

How to execute specified test suites in boost.test library

浪子不回头ぞ 提交于 2019-12-11 05:48:48
问题 I am using Boost.Test library for implementing unit test cases in C++. Suppose I have two suites such as BOOST_AUTO_TEST_SUITE(TestA) BOOST_AUTO_TEST_CASE(CorrectAddition) { BOOST_CHECK_EQUAL(2+2, 4); } BOOST_AUTO_TEST_CASE(WrongAddition) { BOOST_CHECK_EQUAL(2 + 2, 5); } BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE(TestB) BOOST_AUTO_TEST_CASE(CorrectAddition) { bool ret = true; BOOST_CHECK_EQUAL(ret, true); } BOOST_AUTO_TEST_CASE(WrongAddition) { BOOST_CHECK_EQUAL(2 + 2, 5); } BOOST_AUTO

JUnit Test Runner that creates tests just before running them

不打扰是莪最后的温柔 提交于 2019-12-10 19:20:18
问题 I use JUnit 3.x TestRunner that intantiates all tests at once before running them. Is there a Test Runner available that would create each test (or at least each test suite's tests) just before running them? I can use JUnit 4.x runners but my tests are 3.x tests. 回答1: In JUnit 3 you'd need to write your own TestSuite class that delayed instantiation of the tests in the suite. 回答2: You are probably doing it wrong. Each unit test should be self-contained and not depend on any other test results

Manually adding test suite to nose

北城以北 提交于 2019-12-10 17:33:04
问题 I want to create a test suite manually instead of using test discovery (only in one module, the others should use discovery). I found how I can do this in unittests, but I'm not sure how to transfer that to nose and how it mixes with the discovery. The nose docs don't have examples and I don't understand how I'm supposed to use them. Could somebody please give me an example? Details: I have test classes where I want to run each method a few times with different parameters. Ideally also

Parameterized unit test suites

允我心安 提交于 2019-12-10 03:20:56
问题 I am trying to set up some parameterized test suites, unfortunately without any luck so far. I have two set of parameters, and I would like to run multiple test cases (they are in different classes) with all possible combinations. I tried to do it with JUnit4, but I am unable to set it up correctly. This would be my basic idea: TestSuite1.class sets up one set of parameters, then it starts TestSuite2.class . TestSuite2.class sets up the second set of parameters, then it starts the actual test