automated-tests

Can I run an XCTest suite multiple times?

巧了我就是萌 提交于 2019-12-30 09:06:09
问题 Is it possible to have Xcode run your unit tests multiple times? I had an issue in several unit tests that caused intermittent failures. Now that I think I've fixed it, my only option appears to mash ⌘ + U until I'm 95% confident the bug is gone. I know other unit testing frameworks make it quite easy to run a single test, test case, or test suite multiple times. Do we have this luxury in XCTest yet? 回答1: It might help you to use func testMultiple() { self.measureBlock() { ... XCTAssert

How to provide login credentials to an automated android test?

家住魔仙堡 提交于 2019-12-30 07:57:30
问题 I'm looking for a way to "provide a login" to my app so an automated test "is logged in" and can test the entire app. Currently it's of course blocked by the login-screen. Because I'm using SmartLock for Passwords, this might be a chance to provide some credentials for the test - but I don't know how. Is there some best-practice to provide credentials to / skip the login during a test? I could think of a special buildType / -flavor which is mocking the login but this way it can't be used to

TestNG retryAnalyzer only works when defined in methods @Test, does not work in class' @Test

…衆ロ難τιáo~ 提交于 2019-12-30 07:31:43
问题 This works as supposed, test fails (due to haltTesting()) and is repeated 2x public class A0001_A0003Test extends TestControl { private Kunde kunde = Kunde.FR_WEHLITZ; @Test(retryAnalyzer = TestRepeat.class, groups = {TestGroups.FAILED}, description = "verify adress") public void testkundenDaten_Angaben() throws Exception { bifiTestInitial(); testActions.selectKunde(kunde); haltTesting(); } } but because i have multiple tests in one class, i defined the repeatAnalyzer on class level @Test

how to get text from textview using espresso

三世轮回 提交于 2019-12-30 02:45:10
问题 I want get text string shown in a textview in LinearLayout. can espresso do that? If not, is there other way to do that or can I use android api in espresso test case? I am using API 17 18 or newer, espresso 1.1(It should be the latest one.). I have no clue about this. Thanks. 回答1: The basic idea is to use a method with an internal ViewAction that retrieves the text in its perform method. Anonymous classes can only access final fields, so we cannot just let it set a local variable of getText(

Increase the screen resolution on Test Agent

瘦欲@ 提交于 2019-12-30 02:28:06
问题 Running a automated test against a desktop WPF application works fine on my local machine and on Azure VM Windows Server 2012R2 when accessed via RDP. However, when the VM is used as build machine, controlled by test agent on TFS or VSTS, all test fails because of the screen resolution is set to 1024x768 screen resolution. The application is not configure to run until this display settings. Is there any way to change the screen settings when we deploy the test agent? Change VSTS agent session

Integrate window tester with eclipse for testing UI

亡梦爱人 提交于 2019-12-29 09:35:11
问题 We are planning to automate testing of my eclipse application GUI using window tester. Version of eclipse is oxygen. Please inform me how to integrate window tester with eclipse application. I do not see any window tester plugin in eclipse market place. If not, Which GUI testing framework can i use to test my eclipse application. Thanks in Advance. 回答1: I have personally used first two types of the frameworks: SWTBot RCPTT Jubula RedDeer RCPTT is focused on creating and running UI/System test

How can TFS build process be configured to execute tests on Test Agents through a Test Controller?

百般思念 提交于 2019-12-29 08:02:30
问题 We have a Visual Studio test controller with 3 registered test agents in a specific test environment setup for our nightly automation runs. I've seen ample documentation on having the build agents run the tests, but we need the test execution to go through the controller and run from the test agents instead. My thought was to edit the build process template so it would trigger the execution of these remotely executed tests and then wait for the test run results, but I have no experience with

NUnit: Accessing the Failure Message in TearDown()

左心房为你撑大大i 提交于 2019-12-29 07:14:14
问题 I'm trying to log the results of automated tests run in NUnit in a small database so that data is easily accessible and more securely logged for various reasons. (There's about ~550 automated tests and running them all can take days) I already have access to the ending status of the test (Passed/Failed/Error/Cancelled/Skipped etc..) but I'd like to log the extra detail. I am looking to do this within TearDown(). This is the closest thing I could find, but did not provide me with an answer:

TestCase class not found by Android Studio

妖精的绣舞 提交于 2019-12-29 06:46:13
问题 I have written a simple test case class and placed it in the default test directory for Android Studio: "src/androidTest". I've created an Android Tests build configuration that looks for all Tests in the module. When I run the build configuration, my test does not execute and I get the following message in logcat: W/TestGrouping﹕ Invalid Package: '' could not be found or has no tests . If I specify the test package or even the specific test class, I get similar class not found messages. My

How can I run a QTP test from the command line?

谁说我不能喝 提交于 2019-12-28 16:22:25
问题 There are a few situations where I need to launch and run a QTP test from the command prompt. For example, I'd like to use Windows Task Scheduler to run QTP tests at various times throughout the night, but there is (seemingly) no flag that I can use have QTP.exe open and run a test. How can I accomplish this? 回答1: It's true that with QuickTest Pro, you cannot directly run a test by calling C:\Program Files (x86)\HP\QuickTest Professional\bin\QTPro.exe "C:\Some Test\" All hope is not lost,