From the course: Software Testing Foundations: Continuous Testing and DevOps

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

How to make your tests independent

How to make your tests independent - Jenkins Tutorial

From the course: Software Testing Foundations: Continuous Testing and DevOps

Start my 1-month free trial

How to make your tests independent

- [Instructor] So, let's talk about how to make your tests independent. In order to make your tests run well in a continuous integration environment, you need to make them run independently. An independent test is one that's responsible for its own state and data. Why? Let's take a library application as an example. What are the important workflows of a library application? Users need to be able to search for books, sign in to their accounts, and check out the books they want. So for a test to be independent, we can't really rely on there being a user and a set of books already generated in our application. Instead, we'd want to test workflow to look like this. Create a user, create a book, log in as the user, find the book, and check out the book. Why would you want one test to be responsible for all of this? It is a pretty lengthy test, to be fair. We'll talk more later about how to keep your tests short, while…

Contents