avajs / ava

Node.js test runner that lets you develop with confidence 🚀
MIT License
20.74k stars 1.41k forks source link

Feature request: API for real time reporting #2067

Closed arestov closed 4 years ago

arestov commented 5 years ago

I use ava to run api/integration/end-to-end tests in CI process.

I want to get real time feedback. (Don't want to wait 5 minutes to tests complete to get first failed test). That is why I've choosed http://reportportal.io and going to send reports in real time to it.

Report portal has API and ready client https://github.com/reportportal/client-javascript (as well as intergration agents with jest, jasmine, mocha, cucumber, cypress, nightwatch)

I know I can achive that by using client-javascript and send startLaunch signal before ava launch, pass launch ID to process.env of ava, send some data on hooks + and some data parsing stdout. Or fork/hack VerboseReporter + ./lib/cli.js

But it would prefer API for real time reporting 🙂

novemberborn commented 5 years ago

We have --tap output which is parseable by other programs. I like the idea of an integration you can load into the main process, which can then report progress to services like these.

(Note that this would not be a custom CLI reporter.)

Is this something you want to investigate implementing, @arestov?

arestov commented 5 years ago

Well I would like to. I guess this will be long running issue. I would suggest to discuss API for this feature before implementing. I can design API draft (as I see it). I appreciate your thoughts on limitations and etc.

novemberborn commented 5 years ago

That sounds perfect, @arestov.