Динамические отчеты для автоматизации качества программного обеспечения.

🎋 Намерение:В этой статье объясняется автоматизация следующих шагов.

👽 Как запускать тесты Selenium в Circle CI, написанные на Java

👽 Создайте Extent Report (нажмите на ссылку, чтобы узнать настройки)

👽 Отправьте отчет на GitHub из Circle CI

👽 Автоматический запуск Netlify Build для размещения вашего отчета.

  1. Создайте свою учетную запись в Circle CI и предоставьте доступ к своему репозиторию в GitHub. Как правило, авторизуйтесь с помощью Github Auth Connector.
  2. https://circleci.com/docs/2.0/gh-bb-integration/#deployment-keys-and-user-keys
  3. Создайте приведенный ниже файл конфигурации внутри вашего репо под корнем.

3. Вышеприведенный код в значительной степени является самостоятельным исследованием с несколькими важными моментами, объясненными ниже.

🚂 cron: “0 0 * * *” 
← defines the job frequency to run
🚂 image: circleci/openjdk:8-jdk-browsers 
← we need the browsers to run the tests.
🚂 parallelism: 1 
← Circle CI free tier supports 1 job at a time.
🚂 fingerprints:
      - "2f:6b:14:f1:02:52:ea:6f:as:e0:b4:42:gt:59:33:bd": 
← this is important to get a read write access to your repository if you want to push back the report generated.
🚂 curl -O http://selenium-release.storage.googleapis.com/4.0/selenium-server-standalone-4.0.0-alpha-2.jar 
← this Tells where to download the selenium from and version.
🚂 gradle test 
← Kicks off al the tests
🚂 git commit -m "[skip ci] test result"
← Elimates the loopback builds. commit -> build -> commit. [skip ci] is the point to note

Наконец, после входа в Netlify → Настройте сборку для своего репозитория со следующими конфигурациями.

Base directory Not set <-- Not needed
Build command Not set <-- Just hosting HTML and so no command is needed
Publish directory test-output <-- Important as your report is setup to generate into this directory. (Check here to find how to do that)

Найдите другие мои статьи в моей публикации: ThinkSpecial