Question library
Questions from real interviews. Drill any of them by voice in a couple of minutes, with an interviewer, a score and feedback.
How do you write tests with pytest? Tell me about fixtures and how to replace an external dependency in a test.JuniorHow do you write unit tests in Java, and what is Mockito for?JuniorWhat kinds of tests are used in frontend development, and how do they differ from each other?JuniorWhat tests would you write for a backend service, and how is a unit test different from an integration test?JuniorHow do you decide which tests to write for a frontend application, and at what level?Mid-levelHow do you test backend code that works with a database: do you mock the repositories or spin up a real database?Mid-levelHow do you test the service layer in Spring Boot: when do you write a unit test with Mockito, and when do you bring up the application context?Mid-levelHow would you use pytest to test a function that calls an external payment API and writes the result to a database?Mid-levelHow do you build a testing strategy for a Spring Boot service: what do you verify with unit tests using Mockito, what with integration tests, and why?SeniorHow do you set up testing for a service that works with a database, a message broker and a couple of external APIs? What do you test at which level?SeniorDesign a testing strategy for a large frontend application that has almost no tests, where releases regularly break key user flows.SeniorYou've joined a project as tech lead: three hundred thousand lines of Python, the tests take forty minutes, and half the team doesn't run them locally. How would you rebuild the testing strategy?Senior