Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

of

Stop coding start testing Slide 1 Stop coding start testing Slide 2 Stop coding start testing Slide 3 Stop coding start testing Slide 4 Stop coding start testing Slide 5 Stop coding start testing Slide 6 Stop coding start testing Slide 7 Stop coding start testing Slide 8 Stop coding start testing Slide 9 Stop coding start testing Slide 10 Stop coding start testing Slide 11 Stop coding start testing Slide 12 Stop coding start testing Slide 13 Stop coding start testing Slide 14 Stop coding start testing Slide 15 Stop coding start testing Slide 16 Stop coding start testing Slide 17 Stop coding start testing Slide 18 Stop coding start testing Slide 19 Stop coding start testing Slide 20 Stop coding start testing Slide 21 Stop coding start testing Slide 22 Stop coding start testing Slide 23 Stop coding start testing Slide 24 Stop coding start testing Slide 25 Stop coding start testing Slide 26 Stop coding start testing Slide 27 Stop coding start testing Slide 28 Stop coding start testing Slide 29 Stop coding start testing Slide 30 Stop coding start testing Slide 31 Stop coding start testing Slide 32 Stop coding start testing Slide 33 Stop coding start testing Slide 34 Stop coding start testing Slide 35 Stop coding start testing Slide 36 Stop coding start testing Slide 37 Stop coding start testing Slide 38 Stop coding start testing Slide 39 Stop coding start testing Slide 40 Stop coding start testing Slide 41
Upcoming SlideShare
Agile Progress Tracking and Code Complete Date Estimation
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Stop coding start testing

Download to read offline

Here are the slides that were used during the workshop at Agile Testing Days 2015.

It is a BDD approach using Minosse

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Stop coding start testing

  1. 1. Stop coding start testing Pascal Dufour & Valerio Barrila
  2. 2. Valerio Barrila Tech guy @ninjatux2k Pascal Dufour Test guy @pascal_dufour
  3. 3. Agenda • Why and how Minosse is developed • How to create automated checks in Minosse (CucumberJS) • Thoughts behind writing great feature files
  4. 4. Test tool stack Tools we used
  5. 5. The new tester Program languages • Groovy • JAVA • NodeJS • Ruby https://www.flickr.com/photos/jdhancock/
  6. 6. Easy to switch for testers between projects • One language for test automation across projects • Test written in a uniform style across projects Problems we solved Easy to adapt for new testers • Tests written in a readable language for a techie person • No scripting skills required to write automated tests Easy life for developers • Test implementation code is written once • Bugs and fixes in one place
  7. 7. Agenda • Why and how Minosse is developed • How to create automated checks in Minosse (CucumberJS) • Thoughts behind writing great feature files
  8. 8. Minosse Generic set of common steps for testingAPI github.com/icemobilelab/minosse
  9. 9. Generic set of common steps for testingAPI (ab)-use CucumberJS • Property steps • HTTP steps • Debug steps Minosse
  10. 10. Load testdata • Given I set property foo to testdata foo Setting a property • Given I set property foo of request body to number 4 Remove a property • Given I remove property foo Property setting steps
  11. 11. Set the request body • Given I set the request body to property foo Set a request header • Given I set the request header bar with value foo Set the request content type • Given I set the request header Content-Type with value multipart/formdata Save the response body • Given I set property foo to the response body Http steps Set requests and save response body
  12. 12. Send a request • Given I send a POST request to /foo Sending an HTTPS request • Given I secure the connection with certificate certificate.crt and with key keyFile.key Check the response code • Given the response status code is 200 Http steps sending a request and check
  13. 13. Checking if property does not exist • Given I check property foo of response body does not exist Checking the value of a property • Given I check property foo of response body equals number 4 Checking the type of a property • Given I check property foo of response body has type number Checking the format of a property • Given I check property bar has format email Property checking steps
  14. 14. Print a property • Given DEBUG I print property foo Debug steps
  15. 15. API we test http://restcountries.eu/
  16. 16. Install time!
  17. 17. Setup your own environment Install instructions 1. Install NodeJS 2. Clone the api repository `git clone git@github.com:aredo/restcountries.git` 3. Checkout the release 0.1.0 `git checkout tags/0.1.0` 4. cd restcountries && npm install minosse cucumber
  18. 18. Or we made an environment for you Install instructions 1. Ask Pascal or Valerio the USB 2. Copy the content somewhere in your machine 3. Import the machine in VirtualBox You can also download the machine here: https://goo.gl/WKXOFk
  19. 19. It works
  20. 20. Folder structure
  21. 21. Steps loader (steps.js)
  22. 22. Assignments
  23. 23. Scenario: Calling Get should return a 200 status code Given I send a GET request to / When the response status code is 200 Assignments 1 add a debug step Then DEBUG I print property response body For handouts see https://goo.gl/OyJuZD
  24. 24. Scenario: Calling Get should return a 200 status code Given I send a GET request to / When the response status code is 200 Then DEBUG I print property response body And I check Assignments 2 add a check on the response property message of response body equals string Welcome buddy!
  25. 25. Scenario: Calling Get on endpoint /incorrect should return a 404 status code and the message Sorry, that page does not exist Given I send a GET request to /incorrect When the response status code is 404 And I check Assignments 3 check a specific status property message of response body equals string Sorry, that page does not exis
  26. 26. Scenario: Calling Get on endpoint api/v1 should return a 200 status code and I check multiple properties. Given I send a GET request to /api/v1 When the response status code is 200 And I check Assignments 4 check a specific value property res.body[0].name equals stringAfghanistan
  27. 27. Scenario: I want to show my custom steps
 Given I want to create a custom step Assignments 5 create a custom step
  28. 28. Agenda • Why and how Minosse is developed • How to create automated checks in Minosse (CucumberJS) • Thoughts behind writing great feature files
  29. 29. What the testers do in the project Create test ideas Review documentation Review tests Create automated testsMaintain tests Exploratory testing Review reports
  30. 30. HipChat integration • Developers and Testers in the chat Failure notifications for the team
  31. 31. •Created by the team. •Self verifying data for files en test…. •1 test should test 1 thing (single responsibility pattern).  •Exploratory testing is mandatory for a good check •What is implemented is tested. => Test should always reflect implementation. •We use Coverage Report to measure the test coverage. To train ourselves in creating better test. •Everything is reviewed by the someone in the team or by an other team Writing a good feature file
  32. 32. @collect-active
 Feature:As a user I want to collect and receive stamps with bonus stamp offers
 @BSO
 Scenario Outline:As a user I want to collect and receive stamps with bso
 Given testdata collect_active is stored as collect ........
 When I send a POST request to /…/………………/active
 Then the response status code is 200
 And check property transactionId of response body is property transactionIdentifier
 And check property newBalance of response body is number <newBalance>
 And check property mutation of response body is number <mutation> Examples:
 |amountSpent |bso |value |newBalance |mutation |
 |10 |Bso1Stamps |1 |2 |2 |
 |10 |Bso100Stamps |1 |101 |101 |
 |20 |Bso1Stamps |7 |9 |9 |
 |10          |BsoLimitedLife |1     |2           |2         |
  33. 33. Reports
  34. 34. Reports
  35. 35. Body text • Bullet Slide title
  36. 36. Body text • Bullet Code coverage to change the test
  37. 37. special thanks to Jasper Woudenberg Desmond Delissen Ice mobile
  38. 38. Questions?

Here are the slides that were used during the workshop at Agile Testing Days 2015. It is a BDD approach using Minosse

Views

Total views

976

On Slideshare

0

From embeds

0

Number of embeds

33

Actions

Downloads

17

Shares

0

Comments

0

Likes

0

×