Any way to suppress stack trace?
Closed this issue · 7 comments
There are some instances where I want to display just the number of passing/failing/skipped tests, for example as a very basic health display on a monitor.
The stack trace can get in the way and push the results off the top of the screen, meaning manual intervention is needed to scroll back up.
I am using a Node script as per the Running Tests doc. Is there any way I can suppress the stack trace?
Hi there,
Are you talking about the progress messages whilst running?
If so through the CLI you can pass --hide-progress
And through node you can do TapBark.create(false);
Ah, I see. In that case you can't do it directly. Depending on how you want to use there should be an option for you to extend alsatian to do this.
You can pass the --tap
cli argument or handle the pipeable exposed from TestRunner
. Both of which give you the TAP standard output which you can use libraries such as node-tap npm install tap
to convert this into events and write your own summary to the console or alternatively somewhere else that's relevant for you.
Let me know if you have any further questions or if this is useful for your use case :)
@benji7425 if however we're talking about putting the summary to the bottom of the output that should be doable.
I was mainly after a quick way to make sure the summary is always visible, as a stopgap until I can get around to building a more sophisticated solution.
Moving it to the bottom sounds like a good approach, is that easy to do?
Yep super easy. The file to change is here https://github.com/alsatian-test/alsatian/blob/master/packages/tap-bark/src/tap-bark.tsx
Happy to accept a PR for this one if you're up for it? :)
Sure, probably won't be able to get to it for a few days though