Мы запускаем BDD-тесты в нашем конвейере. Мы запускаем тесты в док-контейнере как часть конвейера jenkins. В настоящее время для запуска всех тестов требуется ~ 10 минут. Мы добавляем много тестов, и через несколько месяцев это может занять до 30 минут. Это выводит много информации. Я считаю, что если я уменьшу количество выводимой информации, я смогу ускорить выполнение тестов. Есть ли способ контролировать объем информации, вести себя на выходе? Я хочу распечатать информацию только в случае сбоя.
Я посмотрел на себя вести себя параллельно. Похоже, это в Python 2.7. Мы находимся в python3.
Я искал различные варианты поведения, обеспечивает.
behave -verbose=false folderName (I assumed that it will not output all the steps)
behave --logging-level=ERROR TQXYQ (I assumed it will print only if there is an error)
behave --logging-filter="Test Step" TQXYQ (I assumed it will print only the tests that has "Test Step" in it)
Ничто из вышеперечисленного не сработало.
Токовый выход выглядит так
Scenario Outline: IsError is populated correctly based on Test Id -- @1.7 # TestName/Test.feature:187
Given the test file folder is set to /TestName/steps/ # common/common_steps.py:22 0.000s
And Service is running # common/common_steps.py:10 0.000s
Given request used is current.json # common/common_steps.py:26 0.000s
And request is modified to set X to q of type str # common/common_steps.py:111 0.000s
And request is modified to set Y to null of type str # common/common_steps.py:111 0.000s
And request is modified to set Z to USD of type str # common/common_steps.py:111 0.000s<br>
When make a modification request # common/common_steps.py:37 0.203s
Then it returns 200 status code # common/common_steps.py:47 0.000s
And transformed result has IsError with 0 of type int # common/common_steps.py:92 0.000s
And transformed result has ErrorMessages contain [] # common/common_steps.py:52 0.000s
Я хочу распечатать только все эти вещи только в случае ошибки. Если все проходит, я не хочу отображать эту информацию.