xctestexpectation Questions

4

Solved

I'm looking for help writing a method which waits until the specified element is not present on a page anymore. I am developing with Swift 2.2 and XCTest. As you can see, I'm a new here and new to ...
Gouache asked 25/5, 2016 at 20:31

5

Solved

The documentation for XCTest waitForExpectationsWithTimeout:handler:, states that Only one -waitForExpectationsWithTimeout:handler: can be active at any given time, but multiple discrete sequen...
Bulbous asked 19/3, 2015 at 16:44

3

I have multiple tests and each test is testing the same asynchronous method for different results with given parameters. I found out for asynchronous tests we have to declare an expectation, wait f...
Franchot asked 30/5, 2017 at 16:3

1

I have a unit test that succeeds when it is run alone but crashes with an EXC_BAD_ACCESS (most of the time) on waitForExpectations when running alongside other tests. func testStartMonitoring() { ...
Sarad asked 14/11, 2016 at 8:39

2

Solved

I'm writing an XCTest unit test in Swift. The idea is that a callback mustn't be called in a certain case. So what I do, is func testThatCallbackIsNotFired() { let expectation = expectationWith...
Literalism asked 27/9, 2015 at 12:7

2

When writing a certain asynchronous test using XCTest and XCTestExpectation I would like to assert that a certain block was not executed. The following code is successful in asserting that a block ...
Trifolium asked 16/2, 2016 at 0:9

1

Important Fact I forgot to mention an important factor in the question. I am running this in a TestCase. I think this issue has something to do with the TestCase not awaiting for async completio...
Trinitrobenzene asked 27/2, 2017 at 8:34

1

Solved

How to stop unit test execution if a logic is failed. Below is the example. How to stop execution when XCTAssertEqual("Hello", "Hi", "Passed") condition is failed. func test_one() { XCTAssertEq...
Federalize asked 5/8, 2015 at 19:36

1

I am testing an asynchronous call using XCTestExpectation. The following code works(the test succeeds) when the completionHandler is executed before the given 1 second timeout. func test__async_...
Pentosan asked 21/12, 2014 at 15:31
1

© 2022 - 2024 — McMap. All rights reserved.