jeudi 21 mai 2020

Analog of TestNG Reporter.getOutput() in Spock

I run API tests using Groovy and Spock. Request/response data, produced by third-party libraries, appear in the system out (I see it in the Jenkins log).

Question: what is the proper way to start-stop system out recording for each test iteration to some list of strings?

TestNG has Reporter.getOutput(result) which returns all log entries, appeared while test iteration run. Is it something similar in Spock?

Am I right assuming it should be some implementation of Run listener where I start recording in beforeIteration() and attach it to report in afterIteration()?

Aucun commentaire:

Enregistrer un commentaire