Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
ProgrammingMiddleOccasionalScenario

How would you approach error handling under parallel execution?

Answer

Start by making inputs, outputs, ownership and failure behavior explicit before choosing an implementation. Focus on error handling under parallel execution. Use small deterministic units plus integration behavior at real boundaries as the oracle. Cover normal flow, invalid inputs, exceptions, concurrency and resource cleanup. Keep data and dependencies controlled enough to reproduce failures. Release only when tests fail for one understandable reason and the code remains easy to change.

Strong answer includes

  • explicit risk and test oracle for error handling
  • controls side effects and dependencies
  • designs for deterministic tests
  • measurable evidence and residual-risk statement

Practical example

When one of ten parallel API calls in a batch failed, the batch handler's error handling only logged the first exception it saw and silently dropped the other nine results, some of which had also failed differently. The approach was to collect every parallel failure into an aggregate error object and assert on the full set in tests, not just the first one encountered.

#programming#test-code#error-handling

Sources

Git referenceGit Project · Version control concepts and commandsPlaywright best practicesMicrosoft · Reliable modern browser automationSelenium documentationSelenium Project · WebDriver architecture, waits, Grid and browser automationMDN JavaScript GuideMozilla · Functions, closures, objects, classes, error handling and asynchronous programming (promises, async/await)