Software Testing Tutorial #24 - Regression Testing in Agile Development

Software Testing Mentor
20 Nov 202010:27

Summary

TLDRThis tutorial explains regression testing within an agile development approach, particularly in a Scrum framework. It highlights the challenges of manual regression testing across multiple sprints as the number of test cases grows. The solution suggested is automating regression testing by identifying key test cases and building an automated regression suite throughout the development process. Tools like Selenium for UI automation or API-level automation tools are recommended to efficiently manage regression testing in agile projects, ensuring that previous functionalities remain intact as new features are introduced.

Takeaways

  • 💡 Regression testing ensures that existing functionality continues to work after new code or features are added.
  • ⚙️ In agile development, specifically Scrum, the project is divided into sprints, typically lasting 2-4 weeks.
  • 📋 User stories, which represent the project requirements, are assigned to each sprint for development and testing.
  • 🧪 Testers write test cases for each user story and test the functionality based on the acceptance criteria during the sprint.
  • 🔄 Regression testing ensures that code changes or additions do not break previously working functionalities.
  • 🚧 Manual regression testing becomes increasingly challenging with each sprint due to the growing number of test cases.
  • 🤖 Automation is a key solution for handling regression testing in agile projects to save time and ensure accuracy.
  • ✅ Test cases are prioritized and marked as regression candidates based on their importance and usage frequency.
  • 🔧 Automated regression suites are built gradually, sprint by sprint, reducing the need for manual testing.
  • 🛠️ Tools like Selenium and API-level testing tools can be used for automating both UI and API regression tests.

Q & A

  • What is regression testing, and how is it different from retesting?

    -Regression testing ensures that existing functionality continues to work after code changes, while retesting focuses on verifying if specific defects or issues have been fixed. Retesting is part of regression testing but they serve different purposes.

  • What is the main challenge of performing regression testing in an agile development approach?

    -The primary challenge is that with each sprint, the number of test cases grows, making manual regression testing increasingly time-consuming and unfeasible, especially with short development cycles like 2-week sprints in Scrum.

  • How are test cases organized in Scrum for each sprint?

    -Test cases are organized based on user stories, which define specific functionalities or requirements. Each user story has acceptance criteria and corresponding test cases, which are tested during the sprint to ensure functionality is as expected.

  • Why is manual regression testing difficult to manage in agile projects?

    -Manual regression testing becomes difficult in agile projects because, as more sprints are completed, the number of test cases that need to be re-executed continues to grow. This makes it unfeasible to manually test all cases without significantly increasing the team size.

  • How can automation help with regression testing in agile projects?

    -Automation helps by reducing the manual effort required to re-execute test cases. As each sprint progresses, test cases marked as critical for regression are automated, allowing them to be quickly executed in future sprints, saving time and resources.

  • What criteria should be used to select test cases for automation in regression testing?

    -Test cases should be selected for automation based on their importance, frequency of use, and impact on the project. It’s essential to prioritize which test cases are most critical, rather than automating all test cases, to build an efficient regression test suite.

  • What is the role of user stories in agile testing?

    -User stories in agile testing define the requirements and functionalities that need to be implemented. Each user story includes acceptance criteria, which are used to create corresponding test cases. These stories guide the development and testing processes in each sprint.

  • How does automation benefit the team in future sprints?

    -By automating test cases in each sprint, the team can run automated regression tests in future sprints without having to manually re-execute test cases. This increases efficiency and allows the team to focus on testing new functionalities rather than re-testing existing ones.

  • What tools are typically used for regression test automation?

    -Common tools used for regression test automation include Selenium for UI testing and various API testing tools. These tools allow teams to automate repetitive test cases and ensure that previously tested functionalities continue to work after code changes.

  • What is the importance of identifying regression test candidates during sprints?

    -Identifying regression test candidates during sprints ensures that only the most critical and relevant test cases are included in the regression suite. This prioritization is crucial for managing the increasing number of test cases over multiple sprints and avoiding unnecessary automation.

Outlines

00:00

👋 Introduction to Regression Testing in Agile Development

The first paragraph introduces the concept of regression testing in the context of agile development, specifically focusing on the Scrum framework. The speaker recalls previous lessons about regression testing and its distinction from retesting. The main focus is on understanding how regression testing fits into the fast-paced, iterative nature of agile projects, particularly in two-week sprints. The paragraph explains that agile teams work on 'user stories' and develop and test functionalities during these sprints, with the need to continuously ensure that previously working features remain functional as new code is integrated.

05:01

🔄 Regression Testing Across Multiple Sprints

The second paragraph dives deeper into how regression testing is performed in agile projects. It emphasizes the challenge of executing all test cases from previous sprints in addition to the current sprint’s functional testing. The speaker explains that as new stories and test cases are added in subsequent sprints, the regression suite keeps expanding, making manual regression testing increasingly difficult. As the project progresses, the number of test cases increases significantly, and manually executing all of them becomes unrealistic. The need for a sustainable testing strategy, like automating test cases, is introduced.

10:03

🤖 Importance of Test Automation in Agile Regression

This paragraph focuses on the solution to handling regression testing in agile projects—automation. It explains that automating test cases helps manage the growing number of regression tests across multiple sprints. The speaker suggests marking critical test cases as 'regression candidates' early in the project and automating them. This allows the team to run automated regression tests in future sprints, ensuring that the core functionalities continue to work without requiring manual re-execution of all test cases. The importance of prioritizing and selecting the most impactful test cases for automation is also highlighted, as not every test case needs to be part of the regression suite.

🏃‍♂️ Automating Regression Testing in Scrum

In this final paragraph, the speaker reiterates how automation plays a crucial role in agile regression testing, specifically within the Scrum framework. They discuss the process of building an automated regression test suite over multiple sprints by identifying regression candidates and automating them. Tools like Selenium for UI testing or API automation tools are mentioned as helpful for this process. The automated suite reduces manual testing efforts in future sprints, ensuring efficient and scalable regression testing. The conclusion highlights the benefit of this approach in achieving agile testing goals efficiently.

Mindmap

Keywords

💡Regression Testing

Regression testing is a type of software testing that ensures that existing functionalities of the application work as expected even after new code or features are added. It checks whether recent code changes have affected previously working parts of the software. In the video, the speaker explains how regression testing is crucial in Agile development to verify that new iterations haven't broken previous features.

💡Agile Development

Agile development is a software development methodology characterized by iterative development, where requirements and solutions evolve through collaboration. In this approach, work is typically done in short cycles called sprints. The video explains how regression testing fits into the Agile framework, particularly by ensuring the continuous integration of new functionalities without breaking old ones.

💡Sprint

A sprint is a time-boxed iteration, typically lasting two to four weeks, in which a specific set of features or tasks (user stories) are developed and tested in Agile projects. The video refers to sprints as the central unit of development cycles in Scrum, where regression testing needs to be performed across sprints to ensure functionality remains intact.

💡User Story

A user story is a simplified description of a feature from the perspective of the end user, used in Agile projects to capture requirements. Each story includes functionality and acceptance criteria that developers and testers work on. The video highlights how regression testing ensures that user stories implemented in earlier sprints continue to work as expected when new stories are introduced.

💡Scrum

Scrum is a popular framework for implementing Agile development, which organizes work into sprints. The video uses Scrum as an example of how regression testing is applied in iterative, short development cycles to make sure new updates don’t disrupt existing features. It explains that the Scrum methodology emphasizes short iterations and continuous testing.

💡Automation

Automation in software testing refers to using tools and scripts to automatically execute test cases, reducing manual effort. The video discusses how automation is essential in Agile development, particularly for regression testing, as manually re-executing all tests after each sprint becomes unfeasible due to the increasing number of test cases.

💡Test Cases

Test cases are specific conditions or scenarios used to verify whether a software application behaves as expected. In the video, test cases are written for each user story to ensure that the functionalities meet their acceptance criteria. Over time, selected test cases are marked as candidates for regression testing to be re-executed in future sprints.

💡Sprint Backlog

A sprint backlog is a list of user stories or tasks that the team commits to completing during a sprint. The video references the sprint backlog to explain how regression testing is conducted as new user stories are added in each sprint. It ensures that the backlog of completed tasks from previous sprints remains functional as new features are introduced.

💡Manual Testing

Manual testing is the process of manually executing test cases without the use of automated tools. The video describes how manual regression testing becomes impractical in Agile projects, as the number of test cases increases with each sprint. Automation is suggested as a solution to reduce the effort required for regression testing in future sprints.

💡Progression Testing

Progression testing focuses on verifying the new functionality or changes in the software, ensuring that the newly implemented features work correctly. In the video, progression testing is contrasted with regression testing, where progression ensures the current sprint's features work while regression ensures the previous functionalities remain unaffected.

Highlights

Introduction to regression testing in the agile development approach.

Clarification of the difference between regression testing and retesting.

Explanation of the Scrum framework, its two to four-week development cycle, and sprints.

Description of user stories in agile, including their role in defining functionalities and acceptance criteria.

Manual regression testing challenges in agile projects due to increasing test case volume with each sprint.

Identification of the need for regression testing to ensure existing functionality remains intact after new features are added.

Discussion of the impracticality of manually executing all test cases as the project progresses through multiple sprints.

Importance of prioritizing and selecting the most important test cases for regression testing.

Suggestion to automate regression test cases to reduce manual testing workload in future sprints.

Overview of how to build a regression test suite by identifying regression candidates during functional testing.

Emphasis on selecting and automating high-priority test cases for the regression test suite.

Explanation of how to use automation tools like Selenium for UI testing and API tools for backend automation.

Guidance on continuously building and expanding the automated regression test suite throughout the project.

Suggestion that automating test cases in each sprint reduces future regression testing efforts.

Conclusion: Tackling regression testing in agile by leveraging automation ensures efficient testing as the project scales.

Transcripts

play00:00

hello everyone welcome again in this

play00:02

software testing tutorial

play00:04

we are going to learn regression testing

play00:06

in

play00:07

agile development approach so in the

play00:09

previous tutorial we have understood

play00:11

what is

play00:12

regression testing and how it is you

play00:14

know different

play00:15

from retesting or you can say retesting

play00:18

is sort of

play00:18

part of regression testing but they are

play00:20

not same so re-testing and regression

play00:22

testing are different

play00:23

and i explain i will explain it in the

play00:25

next tutorial

play00:26

now in continuation to what is

play00:29

regression testing when do you do it

play00:31

you know we also need to understand what

play00:34

is regression testing in agile or how

play00:36

you need to basically

play00:38

uh you know approach regression testing

play00:40

in agile development approach

play00:42

so uh if we talk about the agile

play00:45

development approach

play00:46

uh say for example you are following

play00:49

scrum so scrum

play00:50

is two to four weeks development cycle

play00:54

now in the two to four weeks development

play00:56

cycle or iterations which are also known

play00:58

as prints

play00:59

so say for example your project follows

play01:01

two weeks print so what you

play01:03

will have in two weeks sprint is you

play01:04

will have the sprint backlog and sprint

play01:06

backlog is nothing but

play01:08

the set of stories or the features that

play01:10

you will be you know

play01:12

implementing in those two weeks as a

play01:14

team and

play01:16

developing that and basically showcasing

play01:19

or

play01:19

demoing the working software

play01:23

after the two weeks or the sprint gets

play01:26

over right

play01:27

so say for example if i say sprint one

play01:30

is your first sprint which is basically

play01:34

uh you know two weeks cycle okay so in

play01:37

scrum you will be having you know

play01:39

two weeks or whatever cadence that you

play01:41

choose so

play01:42

if your project has chosen two weeks

play01:46

sprints then you will be following two

play01:47

weeks prints until

play01:49

the completion of the project so in the

play01:51

two weeks

play01:52

for example you have picked you know

play01:54

four stories so story one

play01:56

story two story three and story four and

play01:59

stories are nothing but the requirements

play02:01

in the agile project or scrum so these

play02:05

stories are basically the

play02:06

functionalities that will define that

play02:08

will have the functionalities and the

play02:10

uh or the requirement and the acceptance

play02:12

criteria

play02:13

which is defined in these stories and

play02:16

these will be implemented in the sprint

play02:18

right so developers will start working

play02:21

using these requirements which are

play02:23

nothing but the stories user stories and

play02:25

they'll start

play02:26

developing those user stories testers

play02:28

will collaborate with developers bas and

play02:30

they'll start

play02:31

you know documenting or writing the test

play02:33

cases and as soon as the functionalities

play02:36

are available testers will start testing

play02:38

the stories and ensure that the

play02:41

acceptance criteria

play02:43

that is met in these stories is as

play02:45

expected

play02:46

right so when we talk about regression

play02:49

testing in agile

play02:50

how it is it becomes challenging in

play02:53

agile

play02:54

if you cater for the manual regression

play02:57

testing we'll understand that so say for

play02:59

example this is the first print

play03:00

and you have four stories and each story

play03:04

has say for example this story has four

play03:06

test cases this has five

play03:08

this has you know seven and this has ten

play03:10

test cases right

play03:11

so these are the test cases that you

play03:13

have written for these

play03:14

four user stories to verify that the

play03:18

functionality that is defined in these

play03:19

user stories is as

play03:21

expected right now this is the

play03:24

number of test cases that you have

play03:26

written and executed in sprint one

play03:28

now once print one got over say for

play03:31

example

play03:32

here you have executed all of these you

play03:34

know manually right so there will be

play03:36

another next print which is sprint two

play03:39

and in sprint two which is again

play03:42

next two weeks cycle and in sprint two

play03:46

you will get another

play03:47

user requirements right so another user

play03:49

story is based on the priority say for

play03:51

example

play03:52

five six seven eight right so four

play03:55

stories again

play03:56

or maybe you know like nine stories

play03:58

depending on you know capacity

play04:00

of the team and the size of the stories

play04:03

so in the next print now you have

play04:06

five more user stories to actually test

play04:09

and you are documenting the test cases

play04:11

for these user stories

play04:13

okay so you have couple of test cases

play04:15

written for

play04:16

these user stories and now these are the

play04:19

number of test cases that you have

play04:20

written

play04:21

for these user stories for sprint two so

play04:23

you will be doing the progression

play04:25

testing which is

play04:25

functional testing of these user stories

play04:28

in the second sprint

play04:30

as well as because in the second sprint

play04:33

the code that has been written in the

play04:35

first print there will be new addition

play04:37

to the code

play04:38

that is written in sprint 1 from sprint

play04:41

two as well then you need to ensure that

play04:44

the existing functionality that was

play04:46

working in sprint one

play04:48

hasn't broken right so that is what a

play04:51

regression testing

play04:52

is to ensure that any existing

play04:55

functionality of the application

play04:57

that has already been working prior to

play05:00

the new implementation

play05:02

beat addition of the new functionality

play05:04

which is which is in this case

play05:06

you know addition of the new

play05:08

functionality that are part of the user

play05:10

stories

play05:11

or if say for example there was a defect

play05:13

that you raised in sprint one

play05:15

and that got fixed so you re-executed

play05:19

so any updates that happen you need to

play05:22

re-execute

play05:23

the existing functionality or a subset

play05:26

of existing functionality

play05:28

uh based on the addition uh whatever

play05:31

updation has been done and ensure that

play05:33

existing functionality

play05:35

works so in this particular

play05:38

case what you need to do is you need to

play05:39

either pick all of these test cases that

play05:42

you have picked in sprint 1

play05:43

and re-execute in sprint 2 to ensure

play05:46

that everything that was passed in

play05:47

sprint 1

play05:49

is still working right but that is

play05:51

really really not feasible in agile

play05:53

project if you are doing the manual

play05:55

testing or even if you are doing the

play05:56

automation testing

play05:58

so what you do in agile projects um you

play06:01

know the reason for that is why it is

play06:02

not feasible so for example there is

play06:04

another sprint

play06:05

three okay so they'll be in like 10 15

play06:08

20 sprints you know until you

play06:10

release the software it depends how big

play06:12

your project is

play06:13

so in sprint three which is another two

play06:15

weeks you will be having

play06:17

some more stories right so 10 11

play06:20

12 13 14 so like four

play06:24

five more stories there will be you know

play06:26

new test cases

play06:27

and then here if you want to execute the

play06:30

overall

play06:31

test cases or regression test cases you

play06:33

have to execute

play06:34

these plus these and then plus the

play06:38

functional test cases that you write in

play06:39

sprint three so with each and every

play06:42

upcoming sprint your number of test

play06:44

cases

play06:45

that need to be executed as part of the

play06:47

regression suite

play06:48

will keep increasing right and

play06:52

that is not possible with the size of

play06:54

team that you will be having you can't

play06:56

keep adding new members or new addition

play06:59

to your team

play07:00

in each sprint so this is the biggest

play07:02

challenge

play07:03

in the agile testing approach right

play07:06

now how you can tackle it is basically

play07:09

through

play07:09

automation right so the first thing is

play07:11

to basically

play07:12

if say for example in this particular

play07:14

sprint

play07:16

you have couple of test cases so you can

play07:19

target

play07:20

as part of the automation you automate

play07:23

the regression test cases that you have

play07:25

identified from this list

play07:27

so in the sprint one as you do the

play07:30

progression test cases or the test cases

play07:33

that have been part of these

play07:35

stories you also keep marking them which

play07:38

of them are very important and

play07:41

need to be part of the regression suite

play07:44

so you

play07:45

in the tool itself you mark those test

play07:47

cases as a regression so that your

play07:49

regression test suite gets

play07:51

built as you progress with within the

play07:54

sprint

play07:55

along with that you need to say for

play07:57

example out of these four test cases you

play07:59

marked one as regression candidate

play08:01

you mark two out of these five as

play08:03

regression candidates

play08:04

uh two out of these seven and then two

play08:07

out of these ten

play08:08

as a regression candidate you should not

play08:10

try to include

play08:11

all of the test cases that you have

play08:13

tested as part of the functional testing

play08:15

as

play08:15

the regression test suite if you are

play08:17

doing that then you are basically

play08:18

you know not segregating what is really

play08:21

important and what is less

play08:23

important in the project and in a

play08:25

project or in

play08:26

the features uh everything can't be

play08:29

important right so it has to be

play08:31

prioritized based on the highest

play08:33

priority or the highest usage

play08:35

and the low usage and the low priority

play08:38

so based on that you basically come up

play08:39

with the test cases that will

play08:41

form your regression test suite right

play08:43

and these test suite you try to automate

play08:46

as you progress along in the sprint in

play08:49

the agile project

play08:50

right so say for example now i have you

play08:52

know seven test cases

play08:54

uh in the next sprint uh i'll have a

play08:57

team or i'll have

play08:58

team members who will automate these

play09:01

test cases so that

play09:02

when we are in the next print we can

play09:04

basically rather than executing these

play09:07

test cases manually as part of the

play09:09

regression testing we will

play09:11

in sprint to run these test cases

play09:14

with the automation tool so you can use

play09:16

you know selenium or if you can you are

play09:18

automating using the api tools

play09:20

at the api level you can you do the api

play09:23

test automation

play09:24

and there are number of tools available

play09:26

to do the ui automation

play09:28

so you can use those tools to automate

play09:31

and

play09:32

you know once you are in sprint 2 you

play09:34

have the automated suite ready

play09:35

then when you go to the sprint 3 you

play09:37

identify the regression candidates in

play09:39

sprint 2

play09:40

automate those and sprint 3 you are

play09:42

having that

play09:43

automated test suite built and ready

play09:47

that is automated regression test suite

play09:49

and that will

play09:50

reduce the amount of effort that you

play09:53

need to put

play09:54

manually each and every sprint and will

play09:57

help you to achieve

play09:58

the regression target and regression

play10:00

testing in the agile

play10:02

project and scrum um agile scrum

play10:05

basically so scrum

play10:07

is uh the framework uh which is very

play10:09

widely used

play10:10

agile used agile development methodology

play10:12

nowadays right

play10:14

so this is how you can tackle regression

play10:16

testing in

play10:17

agile development approach so that's all

play10:20

for this tutorial hope it was helpful

play10:23

please do share and subscribe and thank

play10:25

you very much for watching

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
Regression TestingAgile ApproachScrum SprintsTest AutomationSoftware TestingUser StoriesSprint BacklogManual TestingFunctional TestingTesting Tools
Benötigen Sie eine Zusammenfassung auf Englisch?