![]() Having the tests elsewhere facilitates this process. In some cases, the tests need an entirely different environment to run the tests. For example, if the test framework requires a different way to set up, it's better to separate it from the application for simplicity. In some cases, a separate repo will become more of a necessity. Each repo will contain only the things it's concerned about, so it's easier to navigate and focus on specific tasks. Overall, it keeps the overall development and testing environment cleaner. Having a separate repo has its set up benefits. These tests run alongside the application, often using built-in tools included in the application's framework. For instance, the application developers can write and maintain smaller unit and integration tests. ![]() This setup doesn't necessarily mean that the testing repo will only contain tests the application repo can also provide its own set of tests. On the other side, the end-to-end testing repo can contain jobs to set up the application under test and execute the tests. The application repo can have specific tasks for building and running the application. In this scenario, each repo will contain a workflow according to its needs. For instance, your primary application is in a repo called awesome-app, and your end-to-end tests live in another repo called awesome-app-tests. Putting your end-to-end tests separately from your application means you'll have at least two code repositories. Placing your end-to-end tests in a separate repo Which choice should you make? Let's take a look at both options. Unless you're using an application framework that has an opinionated way of doing things (like Ruby on Rails or Laravel), it's up to you to choose. For the most part, you're not tied down to a defined standard. ![]() Many test frameworks give you the freedom to choose how you want to structure your tests. It's a fair question to ask when the application you want to test is under a single code repository. Both experienced and new testers alike always wonder what's the best thing to do. This question pops up over and over again online. When you're beginning to write end-to-end tests for an application, a common question arises: Should I keep these tests next to the application code, or separate it into a different repo?
0 Comments
Leave a Reply. |