-
Notifications
You must be signed in to change notification settings - Fork 515
Logging capabilities #28
Comments
Sounds good. Let's start with a way to log the stdout and stderr of every test case to a file. |
Ok this sounds great. Do you prefer one log file per test, or combined log file for all tests with some separators? Also, how would you like to be this enabled? I guess not by default, so new option? |
Yes, with a command-line option. Seems like the simplest way to make this work is just to append the log output to the filename specified in the option's argument. |
I wouldn't mind if there would be a way to have the output in different files, perhaps the specified filename + test file name + test number (or filename + PID or any combination of these). That'd make it easier to find which output belongs where, than having to split a larger file first. |
I was thinking about this as well, but problem with that are filenames. N_test_name_with_underscores_instead_spaces.log But this can be problematic because we need to escape special For this reason, I will start with single log file, I will probably add On Mon, Nov 04, 2013 at 01:55:22PM -0800, Gergely Nagy wrote:
Later, Lukas "lzap" Zapletal |
Suggestion: prefix each line of log output with a timestamp and the test name. |
May be useful to use logger to create these logs. What you think, guys? |
@henriquemoody I think that would be overengineering it. Just dump the output to a file (with test name + timestamp) and Sam suggested. No need to use an external utility or split output to multiple files. Keep it simple. @lzap Want to do a PR? |
Sure thing! I was waiting for more recommendations, it looks like I will
LZ On Tue, Nov 05, 2013 at 01:38:24PM -0800, Mislav Marohnić wrote:
Later, Lukas "lzap" Zapletal |
I am wondering how to pass the new option |
Ok got a first version, here it how it looks like:
Frankly, not the best output. Tried to output test numbers but it resets every suite, so PID looks much nicer in this case. I tried various dividers but it looks quite ugly, so I ended up with this simple and plain output. Opinions? |
We are using it as part of CI build for cookbooks, I would like to see here is the ability to produce some (xml may be) reports, so that there is one common parser to read the reports and puts it on pretty html view on build reports, like most of the CI server does for some test frameworks (junit for example) |
Is this functionality going to be added? I tried using --verbose but the command barfed, neither did a man page indicate same. I have latest as of today. |
Bats can be easily integrated with Jenkins. See the README.
I still have a local patch that does not work, no time :-( Later, Lukas "lzap" Zapletal |
@JigarJoshi the default bats TAP output has plugin for Jenkins, it works nice for us: http://ci.theforeman.org/view/Installer/job/systest_foreman/1566/ @sstephenson on my radar |
Here's an evolution of #50 that sends the output to the log also. |
This list is taken from sstephenson#28. The only line I added myself is this: > Everything from 3.2.57(1) and higher Is this true indeed?
Hello,
I am evaluating bats for running installation and end-to-end cli testing of our project. So far so good, but one issue I have is I would like to be able to inspect output of the installation steps.
I use normal
@test
taks to do installation steps. It looks like something is logged as/tmp/bats.PID.out
and then deleted.What I would like to have would be something like:
--verbose
option to watch the progress of all tests (output + stderr)I will be happy to contribute one or both features, as long as you are fine with that.
The text was updated successfully, but these errors were encountered: