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.

Allure framework

4,485 views

Published on

Slides for my talk on SeleniumConf'14, Bangalore. You can find demo video here https://yadi.sk/i/W1KFLnihb8ADd

Published in: Software
  • Be the first to comment

Allure framework

  1. 1. Allure framework Artem Koshelev 1 Selenium Conference, 4-6 Sept, Bangalore
  2. 2. 2 Artem Koshelev QA Team Lead @ Yandex artkoshelev@yandex-team.ru twitter: @art_koshelev
  3. 3. 3 image source: flickr.com
  4. 4. 4 Reports image source: flickr.com
  5. 5. What is a good report? 5 Allure framework architecture Demo image source: flickr.com
  6. 6. 6 Good reports… image source: flickr.com
  7. 7. 7 Good report - speed and precision image source: flickr.com
  8. 8. 8 Unit-tests
  9. 9. API-tests 9
  10. 10. Web-tests 10
  11. 11. 11 Good report - contains all required data image source: flickr.com
  12. 12. 12 Good report - same, but different image source: flickr.com
  13. 13. You have no time 13 image source: flickr.com
  14. 14. Allure framework 14 image source: flickr.com
  15. 15. 15 Step-based image source: flickr.com
  16. 16. 16 Cross-language
  17. 17. 17 Easy integration image source: flickr.com
  18. 18. 18 http://bit.ly/allure-demo-report
  19. 19. Allure architecture 19 image source: flickr.com
  20. 20. Adapter 20
  21. 21. 21 Model Adapter
  22. 22. 22 Model Adapter Report
  23. 23. 23 Model
  24. 24. 24 Step 0: use xUnit model image source: blog.cloudbees.com
  25. 25. 25 Standard xUnit model
  26. 26. 26 Standard xUnit model test suite (test class)
  27. 27. 27 Standard xUnit model test suite (test class) test case (test method)
  28. 28. 28 Standard xUnit model <?xml version="1.0" encoding="UTF-­‐8" ?> ! <testsuite tests="1" failures="0" name= "ru.yandex.qatools.allure.junit.example.SearchTest" time="27.084" errors="0" skipped="0"> ! <testcase classname= "ru.yandex.qatools.allure.junit.example.SearchTest" name="seleniumConfSearch" time="27.084"/> ! </testsuite>
  29. 29. 29 Standard xUnit model <?xml version="1.0" encoding="UTF-­‐8" ?> ! <testsuite tests="1" failures="0" name= "ru.yandex.qatools.allure.junit.example.SearchTest" time="27.084" errors="0" skipped="0"> ! <testcase classname= "ru.yandex.qatools.allure.junit.example.SearchTest" name="seleniumConfSearch" time="27.084"/> ! </testsuite>
  30. 30. 30 Standard xUnit model <?xml version="1.0" encoding="UTF-­‐8" ?> ! <testsuite tests="1" failures="0" name= "ru.yandex.qatools.allure.junit.example.SearchTest" time="27.084" errors="0" skipped="0"> ! <testcase classname= "ru.yandex.qatools.allure.junit.example.SearchTest" name="seleniumConfSearch" time="27.084"/> ! </testsuite>
  31. 31. 31 Standard xUnit model <?xml version="1.0" encoding="UTF-­‐8" ?> ! <testsuite tests="1" failures="0" name= "ru.yandex.qatools.allure.junit.example.SearchTest" time="27.084" errors="0" skipped="0"> ! <testcase classname= "ru.yandex.qatools.allure.junit.example.SearchTest" name="seleniumConfSearch" time="27.084"/> ! </testsuite>
  32. 32. 32 Step 1: simplify and enrich image source: flickr.com
  33. 33. 33 Standart xUnit model <?xml version="1.0" encoding="UTF-­‐8" ?> ! <testsuite tests="1" failures="0" name= "ru.yandex.qatools.allure.junit.example.SearchTest" time="27.084" errors="0" skipped="0"> ! <testcase classname= "ru.yandex.qatools.allure.junit.example.SearchTest" name="seleniumConfSearch" time="27.084"/> ! </testsuite>
  34. 34. Test case status 34
  35. 35. Test case start/stop time 35 image source: flickr.com
  36. 36. Allure model 36 <ns2:test-­‐suite xmlns:ns2="urn:model.allure.qatools.yandex.ru" start="1408112244726" stop="1408112247426" version="1.4.0.RC9"> <name>ru.yandex.qatools.allure.junit.example.SearchTest</name> <test-­‐cases> <test-­‐case start="1408112244737" stop="1408112247287" status="passed"> <name>seleniumConfSearch</name> <steps/> <attachments/> <labels/> </test-­‐case> </test-­‐cases> <labels> <label name="framework" value="JUnit"/> <label name="language" value="JAVA"/> </labels> </ns2:test-­‐suite>
  37. 37. ! Allure model 37 <test-­‐case start="1408112244737" stop="1408112247287" status="passed"> <name>seleniumConfSearch</name> <steps/> <attachments/> <labels/> </test-­‐case>
  38. 38. 38 Step 2: attachments image source: flickr.com
  39. 39. 39 …? Step 2: attachments
  40. 40. 40 Step 3: steps image source: flickr.com
  41. 41. 41 Steps == test scenario image source: xkcd.com
  42. 42. Nested steps 42 image source: flickr.com
  43. 43. 43 Step status
  44. 44. 44 Step attachments image source: flickr.com
  45. 45. 45 Step 4: labels image source: flickr.com
  46. 46. 46 image source: flickr.com
  47. 47. 47 features image source: flickr.com
  48. 48. 48 features stories image source: flickr.com
  49. 49. 49 xUnit + raw data + attachments + steps + labels = Allure model image source: blog.cloudbees.com
  50. 50. 50 Model
  51. 51. 51 Model Adapter
  52. 52. 52 Step 1: language APIs
  53. 53. 53 Step 2: framework adapters PyUnit TestNg
  54. 54. 54 Model Adapter
  55. 55. 55 Model Adapter Report
  56. 56. Allure model - raw data <ns2:test-­‐suite xmlns:ns2="urn:model.allure.qatools.yandex.ru" start="1408112244726" stop="1408112247426" version="1.4.0.RC9"> 56 <name>ru.yandex.qatools.allure.junit.example.SearchTest</name> <test-­‐cases> <test-­‐case start="1408112244737" stop="1408112247287" status="passed"> <name>seleniumConfSearch</name> <steps/> <attachments/> <labels/> </test-­‐case> </test-­‐cases> <labels> <label name="framework" value="JUnit"/> <label name="language" value="JAVA"/> </labels> </ns2:test-­‐suite>
  57. 57. 57 Step 1: model data processing image source: wikipedia.org
  58. 58. 58 Step 2: build html-report
  59. 59. Allure report builder plugins 59
  60. 60. Allure architecture 60
  61. 61. Allure architecture 61 xUnit
  62. 62. Allure architecture 62 xUnit Adapter
  63. 63. Allure architecture 63 xUnit Model Adapter
  64. 64. Allure architecture 64 xUnit Model Adapter Data generator
  65. 65. Allure architecture 65 xUnit Model Adapter Report Data generator
  66. 66. Allure in action 66 image source: flickr.com
  67. 67. http://allure.qatools.ru artkoshelev@yandex-team.ru twitter: @art_koshelev Artem Koshelev 67 Selenium Conference, 4-6 Sept, Bangalore

×