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,668 views

Published on

Published in: Technology
  • Dating for everyone is here: ❤❤❤ http://bit.ly/39pMlLF ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Sex in your area is here: ❤❤❤ http://bit.ly/39pMlLF ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Your GCSE Maths program has helped me immensely in maths. I am much more confident with this subject and I'm striving for better grades. I really appreciate the time you took in making this program because it has boosted many students self-confidence with their exams. ●●● http://t.cn/AirraVnG
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I've found your course really helpful and it's saved a lot of time so I can focus on my other subjects too such as English and Science. Your course has taught me a number of techniques to solve questions quicker. For instance, how to quickly turn recurring decimals into fractions. This has saved a lot of time when completing my mock exams. Thanks Jeevan. Your course is great! ★★★ http://ishbv.com/jeevan91/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Allure Framework

  1. 1. Allure Framework
  2. 2. Artem Eroshenko eroshenkoam@ инженер по автоматизации разработка инструментов
  3. 3. Отчеты автотестов
  4. 4. Хорошие отчеты скорость и точность
  5. 5. Чем дальше от кода тем меньше точность
  6. 6. Юнит тесты
  7. 7. Тесты через API
  8. 8. Web-тесты
  9. 9. Хорошие отчеты необходимые данные содержат
  10. 10. Хорошие отчеты понятны всем
  11. 11. Хорошие отчеты легко читать всем
  12. 12. В Яндексе нет единого универсального отчета
  13. 13. Хабра-подход /company/yandex/blog/200364/
  14. 14. Отчет для функциональных тестов
  15. 15. Allure Framework
  16. 16. Allure Framework Функциональные тесты
  17. 17. Легкость интеграции Allure Framework
  18. 18. Понятность отчета Allure Framework
  19. 19. Allure Framework расширение xUnit
  20. 20. Стандартный xUnit
  21. 21. Стандартный xUnit TestSuite Class
  22. 22. Стандартный xUnit TestSuite Class TestCase Method
  23. 23. Расширение xUnit Аттачменты (Аттачи)
  24. 24. Аттачменты HTML IMAGE JSON XML TXT OTHER
  25. 25. Шаги (Степы) Расширение xUnit
  26. 26. Шаги Вложенность
  27. 27. Шаги Статус завершения Вложенность
  28. 28. Шаги Статус завершения Вложенность Содержат аттачменты
  29. 29. Лейблы Расширение xUnit
  30. 30. Лейблы Способ группировки
  31. 31. Allure Framework = + Стандартный xUnit Шаги Аттачменты Лейблы
  32. 32. Архитектура Allure
  33. 33. Allure Model Allure Adaptor Allure Report Архитектура Allure
  34. 34. Allure Model Test Suite .xml расширение xUnit
  35. 35. <testsuite time=“188”! name=“company.TestMe”! tests=“1” skipped=“0”! errors=“0” failures=“0”>! <testcase! time=“180" name=“testMe”! classname=“company.TestMe” ! />! </testsuite> xUnit Model
  36. 36. Allure Model Test Suite .xml start/stop status test info расширение xUnit severity
  37. 37. <test-suite start="3" stop="25">! <title>Test Suite</title>! <test-cases>!    <test-case start=“5" stop=“23”! status=“passed”! severity="normal">!      <title>Test Case</title>!    </test-case>! </test-cases>! </testsuite> Allure Model
  38. 38. Allure Model steps attachments Test Suite .xml start/stop status severity test info расширение xUnit
  39. 39. <test-case … >! <title>Test Case</title>! <steps>! <step start="3" start="17" ! title=“Open Main Page”/>! </steps>! <attachments>! <attachment title="Image"! source=“image.png“/>! </attachments>! </test-case> Allure Model
  40. 40. <testcase … >! <steps>! <step start="3" start="17" ! title=“Open Main Page”>! <attachments>! <attachment title="Image"! source=“image.png“/>! </attachments>! </step>! </steps>! </testcase> Allure Model
  41. 41. <testcase … >! <steps>! <step start="3" start="17" ! title=“Search by [test]”>! <steps>! <step start="7" start="10"! title=“Type [test]” />! </steps>! </step>! </steps>! </testcase> Allure Model
  42. 42. <testcase … >! <labels>! <label name=“Feature” ! value=“Search”/>! <label name=“Component”! value=“Web Interface”/>! <label name=“Since Version”! value=“1.7.2”/>! </labels>! </testcase> Allure Model
  43. 43. Allure Framework = + Стандартный xUnit Шаги Аттачменты Лейблы
  44. 44. Allure Adaptor jUnit pyUnit Karma Test Suite .xml
  45. 45. Allure Adaptor jUnit pyUnit Karma jUnit Adaptor Test Suite .xml
  46. 46. Allure Adaptor jUnit pyUnit Karma jUnit Adaptor pyUnit Adaptor Test Suite .xml
  47. 47. Allure Adaptor jUnit pyUnit Karma jUnit Adaptor pyUnit Adaptor Karma Adaptor Test Suite .xml
  48. 48. Allure Report Test Suite .xml Test Suite .xml Test Suite .xml
  49. 49. Allure Report Test Suite .xml Test Suite .xml Test Suite .xml Report Data Generator Test Suite .json Test Suite .json Test Suite .json Run Status .json
  50. 50. Allure Report Angular JS + Test Suite .json Test Suite .json Test Suite .json Run Status .json Report Face
  51. 51. Архитектура Allure jUnit jUnit Adaptor Test Suite .xml Data GEN Report
  52. 52. Allure Model Allure Adaptor Allure Report Архитектура Allure
  53. 53. Allure In Action
  54. 54. Allure Lifecycle Allure TestNG Allure jUnit Allure Java Adaptors
  55. 55. Allure Lifecycle Allure.LIFECYCLE.fire(TestSuiteStarted);! Allure.LIFECYCLE.fire(TestCaseStarted);! Allure.LIFECYCLE.fire(StepStarted);! Allure.LIFECYCLE.fire(MakeAttach);! Allure.LIFECYCLE.fire(StepStarted);! Allure.LIFECYCLE.fire(StepFinished);! Allure.LIFECYCLE.fire(StepFinished);! Allure.LIFECYCLE.fire(TestCaseFinished);! Allure.LIFECYCLE.fire(TestSuiteFinished);
  56. 56. Allure jUnit public class AllureRunListener ! extends RunListener{! ! @Override! public void testStarted (…) {! TestSuiteStartedEvent suiteStarted =! new TestSuiteStartedEvent(…);! getLifecycle().fire(suiteStarted);! }! …! } RunListener
  57. 57. public class AllureTestListener ! implements ITestListener{! ! @Override! public void onTestStart (…) {! TestSuiteStartedEvent suiteStarted =! new TestSuiteStartedEvent(…);! getLifecycle().fire(suiteStarted);! }! …! } Allure testNG ITestListener
  58. 58. Allure jUnit Example
  59. 59. Чистый xUnit public void SearchTest {! @Test! public void searchResultsTest() {! …! }! }
  60. 60. Добавляем шаги @Step! public void openMainPage () {! driver.get(“http://yandex.ru”);! }! ! @Step! public void searchBy (String key) {! driver.findElement(id(“text”))! .type(key);! driver.findElement(id(“srch”)).click();! }
  61. 61. Добавляем аттачи @Attach(type=AttachmentType.PNG)! public File makeScreenshot () {! driver.getScreenshotAs(OutputType.File)! }! @Step! public void checkResultHas(String text) {! //получаем текст результатов! //с помощью драйвера, проверяем текст! ! makeScreenShot(); ! }
  62. 62. Пишем тест public void SearchTest {! @Test! public void searchResultsTest() {! openMainPage();! searchBy(“Yandex”);! checkResultsHas(“Yandex”);! }! }
  63. 63. Получаем отчет http://bit.ly/allure-reports
  64. 64. Allure Python Adaptors Allure Lifecycle Allure pyTest
  65. 65. Allure Report Builder Allure Maven Plugin Allure Jenkins Plugin
  66. 66. Демо
  67. 67. Вопросы? https://github.com/allure-framework eroshenkoam@

×