ByteDance logo

ByteDance QA Engineer Interview Questions

33 practice questions for ByteDance QA Engineer interviews

ByteDance QA engineer interviews test automation frameworks, test strategy, CI integration, performance testing, and debugging complex multi-service systems.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer

No verified questions yet for ByteDance.

coding Hard graph #1

1. [OA] Depth-First Search — Video Recommendation Graph Traversal

ByteDance aims to enhance video viewing experience by recommending similar videos based on user preferences. Given a directed graph where nodes represent videos and edges represent user preferences, apply DFS to find all reachable videos from a starting video node.
You need to implement the following function:
- List<Integer> recommendVideos(int[][] graph, int startVideo) - returns a list of all videos reachable from startVideo.
Example 1:
Input: graph = [[1, 2], [3], [3], []], startVideo = 0
Output: [1, 2, 3]
Explanation: From video 0, you can reach videos 1, 2, and 3.
Example 2:
Input: graph = [[1], [2], []], startVideo = 1
Output: [2]
Constraints:
- 0 <= graph.length <= 100
- 0 <= graph[i].length <= 100
coding Medium sliding window #2

2. [OA] Sliding Window — Efficient Video Playlist Filtering for ByteDance

In ByteDance’s video application, we need a system to filter video playlists based on user history. The goal is to maximize the number of unique videos in the playlist while adhering to a maximum length constraint.
You are given an int[] videoIds representing the videos a user has viewed and an int maxLength which is the maximum length that the playlist can be.
The function signature is:
- List<Integer> filterPlaylist(int[] videoIds, int maxLength) - returns a list of video IDs in the filtered playlist avoiding repetition.
Example 1:
Input: videoIds = [1, 2, 3, 1, 2, 3], maxLength = 4
Output: [1, 2, 3]
Explanation: The unique videos that fit within the length 4 are 1, 2, and 3.
Example 2:
Input: videoIds = [5, 6, 5, 7, 8, 6], maxLength = 5
Output: [5, 6, 7, 8]
Explanation: The unique videos that fit within the length 5 are 5, 6, 7, and 8.
Constraints:
- 0 <= videoIds.length <= 10000
- 1 <= maxLength <= 1000
system design Senior api design #3

3. [OA] Class Design — Design a Load Test Orchestrator for ByteDance

In the context of ByteDance's backend performance testing, design a class LoadTestOrchestrator that can schedule and execute load tests across multiple services. The orchestrator must manage test execution and gather metrics.
Class Signature:
- class LoadTestOrchestrator:
- def __init__(self): - Initializes the orchestrator.
- def schedule_load_test(self, service_name: str, duration: int): - Schedules a load test for a given service.
- def execute_tests(self) -> None: - Executes all scheduled tests concurrently.
- def get_test_results(self) -> Dict[str, Any]: - Returns a dictionary of test results for each service.
Example 1:
- Input: orchestrator = LoadTestOrchestrator(), orchestrator.schedule_load_test('serviceA', 60)
- Output: After calling execute_tests() the results can be accessed via get_test_results().
Constraints:
- 1 <= service_name.length <= 100
- 0 <= duration <= 3600
system design Senior api design #4

4. [OA] Class Design — Design a Flaky Test Detector for ByteDance

In testing environments common to ByteDance, it's essential to identify flaky tests to improve the reliability of the automation pipelines. Design a class FlakyTestDetector to help identify tests that fail intermittently and should be reviewed or fixed.
Class Signature:
- class FlakyTestDetector:
- def __init__(self): - Initializes the detector.
- def report_test_result(self, test_id: str, success: bool): - Reports the result of a test execution.
- def get_flaky_tests(self) -> List[str]: - Returns a list of flaky test ids.
Example 1:
- Input: detector = FlakyTestDetector(), detector.report_test_result('test1', True), detector.report_test_result('test1', False)
- Output: detector.get_flaky_tests()
- Returns: ['test1']
Constraints:
- 1 <= test_id <= 100000

Related ByteDance QA Engineer interview prep

Start practicing ByteDance questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free