Подавляющий вывод testdox при использовании поставщиков данных (с большим количеством наборов данных) - PullRequest
0 голосов
/ 12 октября 2019

Мы используем провайдеры данных с большим количеством наборов данных в наших модульных тестах. Для каждого набора данных PHPUnit печатает строку в выводе testdox. В нашем случае это ошеломляет и делает вывод testdox очень трудным для чтения и, следовательно, бесполезным.

Я не смог найти параметр конфигурации или аннотацию, которая позволяла бы PHPUnit печатать только одну строку за тест (независимо от количестванаборы данных, возвращаемые поставщиком данных) в выходных данных testdox.

Есть ли способ, позволяющий PHPUnit печатать только одну строку за тест (независимо от количества наборов данных, возвращаемых поставщиком данных) в выходных данных testdox?

Мы используем PHPUnit 8.4.1 и PHP 7.2.20.

--- Отредактировано: Добавить пример ---

Это фрагмент нашего текущего вывода Testdox:

 ...
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 805
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 806
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 807
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 808
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 809
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 810
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 811
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 812
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 813
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 814
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records with data set 815
 ✔ Returns the net amount to be used for the contra account for taxable aktivkonto an aufwandkonto accounting records
 ✔ Returns the net amount to be used for the contra account for taxable aktivkonto an ertragkonto accounting records
 ✔ Returns the net amount to be used for the contra account for taxable kundenkonto an aktivkonto accounting records
 ✔ Returns the net amount to be used for the contra account for taxable kundenkonto an ertragkonto accounting records
 ✔ Returns the net amount to be used for the contra account for taxable lieferantenkonto an aufwandkonto accounting records
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 0
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 1
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 2
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 3
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 4
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 5
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 6
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 7
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 8
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 9
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 10
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records with data set 11
 ...

Это может быть более сжатый вывод, например, если ни один набор данных не допустил бы неудачу теста:

 ...
 ✔ Returns the cross amount to be used for the account for all appropriate accounting records
 ✔ Returns the net amount to be used for the contra account for taxable aktivkonto an aufwandkonto accounting records
 ✔ Returns the net amount to be used for the contra account for taxable aktivkonto an ertragkonto accounting records
 ✔ Returns the net amount to be used for the contra account for taxable kundenkonto an aktivkonto accounting records
 ✔ Returns the net amount to be used for the contra account for taxable kundenkonto an ertragkonto accounting records
 ✔ Returns the net amount to be used for the contra account for taxable lieferantenkonto an aufwandkonto accounting records
 ✔ Returns the cross amount to be used for the contra account for all appropriate accounting records
 ...

1 Ответ

0 голосов
/ 13 октября 2019

Нет, такой настройки нет. И я не думаю, что было бы полезно добавить. Возможно, вы захотите изучить аннотацию @testdox и возможность использовать там переменные (из параметров поставщика данных) для получения более полезного вывода.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...