iOS testing interview questions
XCTest and Swift Testing, async and concurrent tests, test doubles, UI tests, TDD and LLDB.
– interview-ready · 8 questions in this topic
– of 8 tried
Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.
Questions
- Writing good unit tests with XCTestSpot the bug
- Testing async codePick the fix
- Test-driven developmentOrder the steps
- Test doubles: stubs, spies, mocks and fakesPick the fix
- UI tests with XCUITestFill the blank
- Swift TestingFill the blank
- Testing concurrent code without sleepsPick the fix
- Debugging with LLDBPick the fix
Practise this topic
Flashcards · 11
Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.
Quick quiz · 8 questions
One exercise per question, checked as you go. Needs JavaScript.
Mock interview · 1 set
Timed, out loud, then tick what you covered. Needs JavaScript.
Fix this PR · 1 review
Review a diff like a senior: flag the lines you'd comment on. Needs JavaScript.
Quick facts
Recall the answer first, then tap Show to check.
Test plans
Xcode test plans run the same tests under different configurations, such as languages, sanitizers or environment variables.
XCTest performance tests
measure(metrics:)records metrics such as clock time, memory and CPU across runs.Parameterized tests
Swift Testing's
@Test(arguments:)runs one test function for each input.
Printable cheat sheet · Review your weak spots in this topic