0% found this document useful (0 votes)
25 views39 pages

01 AgileTestingInto

The document provides an introduction to agile methodology and software testing. It discusses the differences between waterfall and agile approaches, describes common agile methods like extreme programming and Scrum, and explains agile testing practices and activities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views39 pages

01 AgileTestingInto

The document provides an introduction to agile methodology and software testing. It discusses the differences between waterfall and agile approaches, describes common agile methods like extreme programming and Scrum, and explains agile testing practices and activities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

INTRODUCTION TO AGILE METHODOLOGY

AND SOFTWARE TESTING

PMIT 6111 Software Testing & Quality Assurance


Requirement Analysis

Design

SOFTWARE DEVELOPMENT
PHASES Coding

Testing

Maintenance
2
WATERFALL VS AGILE

3
WHAT IS AGILE METHODOLOGY?

• The word ‘agile’ means −


• Able to move your body quickly and easily.
• Able to think quickly and clearly.

• Agile is an iterative development methodology, where both development and testing


activities are concurrent.
• Testing is not a separate phase; Coding and Testing are done interactively and incrementally,
resulting in quality end product, which the meets customer requirements. Further,
continuous integration results in early defect removal and hence time, effort and cost
savings.
4
5
CHARACTERISTICS OF AGILE
SOFTWARE DEVELOPMENT
 Light Weighted methodology

 Small to medium sized teams

 vague and/or changing requirements

 vague and/or changing techniques

 Simple design

 Minimal system into production


6
EXISTING AGILE METHODS

• Extreme Programming

• Scrum

• Crystal Methods

• Feature Driven Development

• Lean Development

• Dynamic Systems Development Methodology (DSDM)


7
EXTREME PROGRAMMING -- XP

• Most prominent Agile Software development method

• Prescribes a set of daily stakeholder practices

• “Extreme” levels of practicing leads to more responsive


software.

• Changes are more realistic, natural, inescapable.


8
EXTREME…

Taking proven practices to the extreme

➢If testing is good, let everybody test all the time

➢If code reviews are good, review all the time

➢If design is good, refactor all the time

➢If integration testing is good, integrate all the time

➢If simplicity is good, do the simplest thing that could possibly


work

➢If short iterations are good, make them really, really short 9
EXTREME PROGRAMMING PRACTICES (A)

Principle or practice Description

Requirements are recorded on story cards and the stories to be included in a


release are determined by the time available and their relative priority. The
Incremental planning
developers break these stories into development ‘Tasks’. (As example we we’ll see
Figures 3.5 and 3.6 later.)
The minimal useful set of functionality that provides business value is developed
Small releases first. Releases of the system are frequent and incrementally add functionality to the
first release.

Simple design Enough design is carried out to meet the current requirements and no more.

Test-first An automated unit test framework is used to write tests for a new piece of
development functionality before that functionality itself is implemented.

All developers are expected to refactor the code continuously as soon as possible
Refactoring
code improvements are found. This keeps the code simple and maintainable.
10
EXTREME PROGRAMMING PRACTICES (B)

Principle or practice Description


Developers work in pairs, checking each other’s work and providing the support
Pair programming
to always do a good job.
The pairs of developers work on all areas of the system, so that no islands of
Collective ownership expertise develop and all the developers take responsibility for all of the code.
Anyone can change anything.
As soon as the work on a task is complete, it is integrated into the whole
Continuous integration
system. After any such integration, all the unit tests in the system must pass.

Large amounts of overtime are not considered acceptable as the net effect is
Sustainable pace
often to reduce code quality and medium term productivity
A representative of the end-user of the system (the customer) should be
available full time for the use of the XP team. In an extreme programming
On-site customer
process, the customer is a member of the development team and is
responsible for bringing system requirements to the team for implementation.
11
XP RELEASE CYCLE

12
SCRUM -- AN AGILE PROCESS

• The Scrum approach is a general agile method but its focus is on managing
iterative development rather than specific agile practices.
• There are three phases in Scrum.
• The initial phase is an outline planning phase where you establish the general objectives
for the project and design the software architecture.
• This is followed by a series of sprint cycles, where each cycle develops an increment of
the system.
• The project closure phase wraps up the project, completes required documentation
such as system help frames and user manuals and assesses the lessons learned from
the project.

13
FUNCTIONALITY OF SCRUM

14
BASIC PARTS OF SCRUM
• Role
• The Sprint cycle
• Scrum Master
• Product Owner
• Sprints are fixed length, normally 2–4 weeks. They correspond to the
development of a release of the system in XP.
• Team
• The starting point for planning is the product backlog, which is the list of
• Artifacts work to be done on the project.
• Product Backlog • The selection phase involves all of the project team who work with the
• Sprint Backlog customer to select the features and functionality to be developed during
the sprint.
• Burn-down Charts
• Once these are agreed, the team organize themselves to develop the
• Meetings software. During this stage the team is isolated from the customer and the
• Sprint Planning organization, with all communications channelled through the so-called
‘Scrum master’.
• Sprint Review
• The role of the Scrum master is to protect the development team from
• Sprint Retrospectives external distractions.
• Daily Scrum • At the end of the sprint, the work done is reviewed and presented to
stakeholders.The next sprint cycle then begins.

15
WHAT IS AGILE TESTING?

• Agile Testing is a software testing practice that follows the principles of agile software
development.
• Agile Testing involves all members of the project team, with special expertise contributed by
testers. Testing is not a separate phase and is interwoven with all the development phases such
as requirements, design and coding and test case generation. Testing takes place simultaneously
through the Development Life Cycle.
• Furthermore, with testers participating in the entire Development Lifecycle in conjunction
with cross-functional team members, the contribution of testers towards building the software
as per the customer requirements, with better design and code would become possible.
• Agile Testing covers all the levels of testing and all types of testing.

16
AGILE TESTING ACTIVITIES

• The Agile Testing Activities during an iteration include −


• The Agile Testing Activities at Project Level are −
• Release Planning (Test Plan)
• Participating in iteration planning
• For every Iteration,
• Agile Testing Activities during an Iteration
• Estimating tasks from the view of testing
• Regression Testing • Writing test cases using the feature descriptions
• Release Activities (Test Related) • Unit Testing
• Integration Testing
• Feature Testing
• Defect Fixing
• Integration Testing
• Acceptance Testing
• Status Reporting on Progress of Testing
• Defect Tracking
17
SCRUM BASED AGILE TESTING LIFECYCLE

• In Scrum, the Testing activities include −


• Identify expected behavior of the system to derive test cases from User
Stories
• Release Planning based on Test Effort and Defects
• Sprint Planning based on User Stories and Defects
• Sprint Execution with Continuous Testing
• Regression Testing after the completion of Sprint
• Reporting Test Results
• Automation Testing

18
SPRINT BASED LIFECYCLE

19
A ‘PRESCRIBING MEDICATION’
STORY

20
EXAMPLES OF TASK CARDS
FOR PRESCRIBING
MEDICATION

21
TEST C ASE DESCRIPTION FOR DOSE
CHECKING

22
TESTING IN EXTREME PROGRAMMING

• Testing is central to XP and XP has developed an approach


where the program is tested after every change has been made.
• Unit Tests and Functional Tests
• Test a little, code a little…“Test-first programming”
• Tests become the specification
• Tests give confidence in the system as user is involved
• Tests give courage to change the system
• Automated test harnesses are used to run all component tests each time
that a new release is built.
23
TEST-FIRST DEVELOPMENT

• Writing tests before code clarifies the requirements to be implemented.

• Tests are written as programs rather than data so that they can be
executed automatically. The test includes a check that it has executed
correctly.
• Usually relies on a testing framework such as JUNIT.

• All previous and new tests are run automatically when new functionality
is added, thus checking that the new functionality has not introduced
errors.

24
TEST-DRIVEN DEVELOPMENT

• Test-driven development (TDD) is an approach to program development in which


you inter-leave testing and code development.
• Tests are written before code and ‘passing’ the tests is the critical driver of
development.
• You develop code incrementally, along with a test for that increment. You don’t
move on to the next increment until the code that you have developed passes its
test.
• TDD was introduced as part of agile methods such as Extreme Programming.
However, it can also be used in plan-driven development processes.

25
TEST-DRIVEN DEVELOPMENT

26
TDD PROCESS ACTIVITIES

• Start by identifying the increment of functionality that is required. This should


normally be small and implementable in a few lines of code.
• Write a test for this functionality and implement this as an automated test.
• Run the test, along with all other tests that have been implemented. Initially, you
have not implemented the functionality so the new test will fail.
• Implement the functionality and re-run the test.
• Once all tests run successfully, you move on to implementing the next chunk of
functionality.

27
TDD EXAMPLE

Input Expecte Actual Validity


d Output
Output
72, 77, 75, 10 Pass Fail O/P: Invalid
I/P:Valid
12, 25, 50, 24 Fail Fail O/P: valid
I/P:Valid
120, 200, 225, -20 Wrong Pass O/P: Invalid
Input I/P: Invalid
80,82, 75, 60 Pass Pass O/P: valid
I/P: valid

28
Source: Internet
CUSTOMER INVOLVEMENT

• The role of the customer in the testing process is to help develop


acceptance tests for the stories that are to be implemented in the next
release of the system.
• The customer who is part of the team writes tests as development
proceeds. All new code is therefore validated to ensure that it is what the
customer needs.
• However, people adopting the customer role have limited time available and
so cannot work full-time with the development team. They may feel that
providing the requirements was enough of a contribution and so may be
reluctant to get involved in the testing process.
29
TEST AUTOMATION

• Test automation means that tests are written as executable components before
the task is implemented
• These testing components should be stand-alone, should simulate the submission of input to
be tested and should check that the result meets the output specification. An automated test
framework (e.g. JUnit) is a system that makes it easy to write executable tests and submit a
set of tests for execution.
• As testing is automated, there is always a set of tests that can be quickly and
easily executed
• Whenever any functionality is added to the system, the tests can be run and problems that
the new code has introduced can be caught immediately.

30
XP TESTING DIFFICULTIES

• Programmers prefer programming to testing and sometimes they take short


cuts when writing tests.
• For example, they may write incomplete tests that do not check for all possible exceptions
that may occur.
• Some tests can be very difficult to write incrementally.
• For example, in a complex user interface, it is often difficult to write unit tests for the code
that implements the ‘display logic’ and workflow between screens.
• It difficult to judge the completeness of a set of tests. Although you may have a
lot of system tests, your test set may not provide complete coverage.

31
BENEFITS OF TEST-DRIVEN DEVELOPMENT

• Code coverage
• Every code segment that you write has at least one associated test so all code written has at least
one test.
• Regression testing
• A regression test suite is developed incrementally as a program is developed.
• Simplified debugging
• When a test fails, it should be obvious where the problem lies. The newly written code needs to be
checked and modified.
• System documentation
• The tests themselves are a form of documentation that describe what the code should be doing.

32
ROLE OF TESTER IN AGILE TEAM

• In the Agile Lifecycle, a tester plays a significant Role in −


• Teamwork
• Test Planning
• Sprint Zero
• Integration
• Agile Testing Practices

33
TEAMWORK
• Collaborative Approach − Working with cross-functional team members on Test Strategy, Test Planning, Test
Specification, Test Execution, Test Evaluation, and Test Results Reporting. Contributing the testing expertise in
conjunction with other team activities.
• Self-organizing − Planning and organizing well within the sprints to achieve the targets of testing by
amalgamating expertise from other team members as well.
• Empowerment − Making appropriate technical decisions in achieving the team’s goals.
• Commitment − Committing to understanding and evaluating the product’s behavior and characteristics as
required by the customers and stakeholders.
• Transparent − Open, Communicating and Accountable.
• Credibility − Ensuring the credibility of the test strategy, its implementation, and execution. Keeping the
customers and stakeholders informed on the test strategy.
• Open to Feedback − Participating in sprint retrospectives to learn from both successes and failures. Seeking
customer feedback and acting quickly and appropriately to ensure quality deliverables.
• Resilient − Responding to changes.

34
TEST PLANNING

• Testing Scope
• New functionalities which are being tested
• Level or Types of testing based on the features complexity
• Load and Performance Testing
• Infrastructure Consideration
• Mitigation or Risks Plan
• Resourcing
• Deliverables and Milestones

35
SPRINT ZERO

• Sprint Zero involves preparation activities before the first sprint. A tester needs to collaborate
with the team on the following activities −
• Establishing a business case for the project
• Establish the boundary conditions and the project scope
• Outline the key requirements and use cases that will drive the design trade-offs
• Outline one or more candidate architectures
• Identifying the risk
• Cost estimation and prepare a preliminary project

36
AGILE TESTING PRACTICES

• An Agile tester needs to adapt Agile practices for testing in an agile project.
• Pairing − Two team members work together at the same keyboard. As one of them tests, the
other reviews/analyzes testing. The two team members can be
• One tester and one developer
• One tester and one business analyst
• Two testers

• Incremental Test Design − Test cases are built from user stories, starting with simple tests
and moving to more complex tests.
• Mind Mapping − A mind map is a diagram to organize the information visually. Mind mapping
can be used as an effective tool in Agile testing, using which information regarding the
necessary test sessions, test strategies and test data can be organized.

37
AGILE TESTING STRATEGIES

38
REFERENCE

1. Ian Sommerville, “Software Engineering”, 9th Edition, Chapter 3 – Agile


Software Development
2. https://www.guru99.com/agile-testing-course.html
3. https://www.tutorialspoint.com/agile_testing/index.htm

39

You might also like