Ctrl K

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.Python · TheoryJuniorHow do you write unit tests in Java, and what is Mockito for?Java · TheoryJuniorWhat kinds of tests are used in frontend development, and how do they differ from each other?Frontend · TheoryJuniorWhat tests would you write for a backend service, and how is a unit test different from an integration test?Backend · TheoryJuniorHow do you decide which tests to write for a frontend application, and at what level?Frontend · TheoryMid-levelHow do you test backend code that works with a database: do you mock the repositories or spin up a real database?Backend · TheoryMid-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?Java · TheoryMid-levelHow would you use pytest to test a function that calls an external payment API and writes the result to a database?Python · TheoryMid-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?Java · TheorySeniorHow 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?Backend · TheorySeniorDesign a testing strategy for a large frontend application that has almost no tests, where releases regularly break key user flows.Frontend · System designSeniorYou'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?Python · System designSenior