Coinbase QA engineer interviews test automation frameworks, test strategy, CI integration, performance testing, and debugging complex multi-service systems.
No verified questions yet for Coinbase.
FlakyTestDetector that will track test runs. It must be able to record test run results, particularly monitoring those tests that have varied results across different runs. The class should also provide a method to check if a test is considered flaky after a certain threshold of inconsistency.def record_run(self, test_case: str, result: bool) -> Nonedef is_flaky(self, test_case: str, threshold: int) -> booldef get_flaky_tests(self) -> List[str]detector.record_run('TestCase1', True)Nonedetector.record_run('TestCase1', False)Nonedetector.is_flaky('TestCase1', 1)Truedetector.record_run('TestCase2', True)Nonedetector.get_flaky_tests()['TestCase1']Constraints:1 <= test_case.length <= 1001 <= len(runs) <= 1000TestResultAggregator class that handles the storage and computation of results from multiple test cases run on their framework. This class must have the ability to add test results, get all results, and compute the percentage of passed tests.def add_result(self, test_case: str, passed: bool) -> Nonedef get_results(self) -> List[Tuple[str, bool]]def get_pass_percentage(self) -> floataggregator.add_result('TestCase1', True)Noneaggregator.get_results()[('TestCase1', True)]aggregator.get_pass_percentage()100.0aggregator.add_result('TestCase2', False)Noneaggregator.get_pass_percentage()50.0Constraints:1 <= test_case.length <= 1001 <= len(results) <= 1000Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free