Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... ·...
Transcript of Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... ·...
![Page 1: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/1.jpg)
11/10/2016
Clément Duffau
1
LP IDSE - GL
Introduction to Software Testing
![Page 2: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/2.jpg)
Verification&
Validation
![Page 3: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/3.jpg)
Verification → Answer to technical specifications
Are we building the good product ?
Validation → Answer to functional specifications
Are we building the product correctly ?
V&V
11/10/16 - CD - [email protected] 3
![Page 4: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/4.jpg)
“Testing is the process of executing a program with the
intent of finding errors”Glen Myers
![Page 5: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/5.jpg)
“If test results are also green, what’s the purpose of
tests ?”Marc Rougé (AXONIC CEO)
![Page 6: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/6.jpg)
Are you ok to walk up in a plane if the airman says to you “That’s the first
time this plane will take off” ?
![Page 7: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/7.jpg)
1h of coding~
1h of testing
![Page 8: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/8.jpg)
Test
Trial
Debugging
![Page 9: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/9.jpg)
Test≠
Trial≠
Debugging
![Page 10: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/10.jpg)
Test → Reproducible (mitigation costs)
Trial → Manual
Debugging → Investigation
Test vs Trial vs Debugging
11/10/16 - CD - [email protected] 10
![Page 11: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/11.jpg)
Tests strategies
11/10/16 - CD - [email protected] 11
Unit Test
Integration Test
Validation Test
Code
Conception
Requirements
![Page 12: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/12.jpg)
Software Testing and Agility
![Page 13: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/13.jpg)
Set of conditions for user story validation
Example :
User Story : As an Administrator, I want to be able to create User Accounts so that I can grant users access to the system
Acceptance critera :● If I am an Administrator, I can create User Accounts.● I can create a User Account by entering the following information about the
User: a) Name, b) Email address. The system notifies me that it sent an email to the new User’s email address, containing a system-generated initial password and instructions for the person to log in and change their password.
● I am able to verify with the intended recipient of the email that it was received.
Acceptance Criteria
11/10/16 - CD - [email protected] 13
![Page 14: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/14.jpg)
One (or more) scenario(s) for one condition of the acceptance criteria
Examples :
● Create a user with a name and email● Try to create a user just with email → failure testing● Check the list the people who received the confirmation
Acceptance Test
11/10/16 - CD - [email protected] 14
![Page 16: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/16.jpg)
Software Testing by example
![Page 20: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/20.jpg)
@AfterClass / @BeforeClass
@After / @Before
@Test
assert*
fail()
expected
JUnit Tag words
11/10/16 - CD - [email protected] 20
![Page 21: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/21.jpg)
Purpose :
Simulate the behaviour of real objects
Allows to deal with :
Testing at interface level
Blacked-box component
Mock testing
11/10/16 - CD - [email protected] 21
![Page 23: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/23.jpg)
Let’s start this into an IDE !
![Page 24: Software Testing Introduction tombf-iut.i3s.unice.fr/lib/exe/fetch.php?media=2016_2017:... · 2016-10-11 · Software Testing and Agility. Set of conditions for user story validation](https://reader034.fdocuments.us/reader034/viewer/2022042306/5ed218b2328bb40b05486383/html5/thumbnails/24.jpg)
?