allure framework

67
Artem Koshelev Allure framework 1 Selenium Conference, 4-6 Sept, Bangalore

Upload: artkoshelev

Post on 25-Jun-2015

923 views

Category:

Software


7 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Allure framework

Artem Koshelev

Allure framework

1

Selenium Conference, 4-6 Sept, Bangalore

Page 2: Allure framework

2

Artem Koshelev

QA Team Lead @ Yandex

[email protected]

twitter: @art_koshelev

Page 3: Allure framework

3 image source: flickr.com

Page 4: Allure framework

4

Reports

image source: flickr.com

Page 5: Allure framework

What is a good report?

5

Allure framework architecture

Demo

image source: flickr.com

Page 6: Allure framework

6

Good reports…

image source: flickr.com

Page 7: Allure framework

7

Good report - speed and precision

image source: flickr.com

Page 8: Allure framework

8

Unit-tests

Page 9: Allure framework

9

API-tests

Page 10: Allure framework

10

Web-tests

Page 11: Allure framework

11

Good report - contains all required data

image source: flickr.com

Page 12: Allure framework

12

Good report - same, but different

image source: flickr.com

Page 13: Allure framework

13

You have no time

image source: flickr.com

Page 14: Allure framework

Allure framework

14 image source: flickr.com

Page 15: Allure framework

15

Step-based

image source: flickr.com

Page 16: Allure framework

16

Cross-language

Page 17: Allure framework

17

Easy integration

image source: flickr.com

Page 18: Allure framework

18

http://bit.ly/allure-demo-report

Page 19: Allure framework

19

Allure architecture

image source: flickr.com

Page 20: Allure framework

20

Adapter

Page 21: Allure framework

21

Model

Adapter

Page 22: Allure framework

22

Model

Adapter Report

Page 23: Allure framework

23

Model

Page 24: Allure framework

24

Step 0: use xUnit model

image source: blog.cloudbees.com

Page 25: Allure framework

25

Standard xUnit model

Page 26: Allure framework

26

Standard xUnit model

test suite (test class)

Page 27: Allure framework

27

Standard xUnit model

test suite (test class)

test case (test method)

Page 28: Allure framework

28

<?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>

Standard xUnit model

Page 29: Allure framework

29

<?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>

Standard xUnit model

Page 30: Allure framework

30

<?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>

Standard xUnit model

Page 31: Allure framework

31

<?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>

Standard xUnit model

Page 32: Allure framework

32

Step 1: simplify and enrich

image source: flickr.com

Page 33: Allure framework

33

<?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>

Standart xUnit model

Page 34: Allure framework

34

Test case status

Page 35: Allure framework

35

Test case start/stop time

image source: flickr.com

Page 36: Allure framework

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>

Allure model

Page 37: Allure framework

37

!   <test-­‐case  start="1408112244737"  stop="1408112247287"       status="passed">                          <name>seleniumConfSearch</name>                          <steps/>                          <attachments/>                          <labels/>     </test-­‐case>  

Allure model

Page 38: Allure framework

38

Step 2: attachments

image source: flickr.com

Page 39: Allure framework

39

…?

Step 2: attachments

Page 40: Allure framework

40

Step 3: steps

image source: flickr.com

Page 41: Allure framework

41

Steps == test scenario

image source: xkcd.com

Page 42: Allure framework

Nested steps42

image source: flickr.com

Page 43: Allure framework

43

Step status

Page 44: Allure framework

44

Step attachments

image source: flickr.com

Page 45: Allure framework

45

Step 4: labels

image source: flickr.com

Page 46: Allure framework

46 image source: flickr.com

Page 47: Allure framework

47

features

image source: flickr.com

Page 48: Allure framework

48

features

stories

image source: flickr.com

Page 49: Allure framework

49

xUnit + raw data +

attachments + steps + labels

= Allure model

image source: blog.cloudbees.com

Page 50: Allure framework

50

Model

Page 51: Allure framework

51

Model

Adapter

Page 52: Allure framework

52

Step 1: language APIs

Page 53: Allure framework

53

PyUnit

TestNg

Step 2: framework adapters

Page 54: Allure framework

54

Model

Adapter

Page 55: Allure framework

55

Model

Adapter Report

Page 56: Allure framework

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">          <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>

Page 57: Allure framework

57

Step 1: model data processing

image source: wikipedia.org

Page 58: Allure framework

58

Step 2: build html-report

Page 59: Allure framework

59

Allure report builder plugins

Page 60: Allure framework

60

Allure architecture

Page 61: Allure framework

61

xUnit

Allure architecture

Page 62: Allure framework

62

Adapter

xUnit

Allure architecture

Page 63: Allure framework

63

Adapter

ModelxUnit

Allure architecture

Page 64: Allure framework

64

Adapter

ModelxUnit

Data generator

Allure architecture

Page 65: Allure framework

65

Adapter

ModelxUnit

Data generator

Report

Allure architecture

Page 66: Allure framework

66

Allure in action

image source: flickr.com

Page 67: Allure framework

Artem Koshelev

http://allure.qatools.ru

67

Selenium Conference, 4-6 Sept, Bangalore

[email protected]: @art_koshelev