I would like to use both tasty-ant-xml and tasty-html simultaneously. However,
defaultMainWithIngredients (antXMLRunner:htmlRunner:defaultIngredients)
Doing this and supplying both --html and --xml options at the command line seems to only use the xml output. Is there a way I can get both (and ideally also output to the console as usual) without running the test suite multiple times?
You should be able to do this using composeReporters. I haven't tried it, but something like this should work:
defaultMainWithIngredients
(( antXMLRunner `composeReporters`
htmlRunner `composeReporters`
consoleTestReporter
) : defaultIngredients)
(and if it doesn't, please open an issue)
Related
I'm trying to vusb-analyzer.
It requires *.mon log file.
How can I make usbmon log file (*.mon)?
https://www.kernel.org/doc/Documentation/usb/usbmon.txt
The document you linked in your question is actually the answer, please see the sections 1-3.
In section 3, it says:
# cat /sys/kernel/debug/usb/usbmon/0u > /tmp/1.mon.out
This will create a text file 1.mon.out. Its structure is also described in the same document.
Now, how do I know that this is the file to be opened by vusb-analyzer? From what I see, the website of this project doesn't make it clear what the *.mon file is.
However, you can see it in the source code:
https://github.com/scanlime/vusb-analyzer/blob/master/VUsbTools/Log.py#L498
It clearly states, that the program uses the syntax described in the document that you already know:
https://www.kernel.org/doc/Documentation/usb/usbmon.txt
The name of your file doesn't really matter, but if you want it to end with ".mon", you could simply use:
# cat /sys/kernel/debug/usb/usbmon/0u > ~/somefile.mon
Two warnings:
The line with cat I posted here is just an example and in order to use it, you will need to follow the steps in the document (it won't work without enabling usbmon first)
vusb-analyzer hasn't been updated for years and I wasn't able to run it on my machine. Its website mentions Ubuntu 8.10 so I wouldn't be surprised if others had problems running it, too. (For example, in order to reproduce your problem, provide more help).
In HTML report when a test case fails I don't want the code to appear in the report, only the statements needs to be printed (example of problem). Can anyone help me out here?
I am using Python 3.6, pycharm and generating HTML reports with the help of pytest-html.
Use try and except with in your code and may be include something like below
raise NoSuchElementException("An Error has been registered")
Looking at the documentation under 'Modifying the results table'
https://github.com/pytest-dev/pytest-html
It seems like you should be able to modify the output, which also includes removing. I would suggest trying this approach because the only requirement you have is not displaying the exceptions in the HTML output.
Avoid using try-except constructions in such a way that it suppresses the stacktrace in general, as this will make debugging failed test cases harder to do.
Can I catch the failures found by py.test ? I would like to build a log where I will write the numbers of failures and also the OS tested.
You can log a machine readable result file for this purpose using:
py.test --resultlog=path
Documentation is available here. This file is what many other tools use to inspect the output of a py.test run and, for example, compare results between different runs.
Apart from --resultlog which #srowland showed, you can also use --junitxml to write a JUnit XML file, or write your own plugin to log in a custom format.
I'm using SoapUI Pro and a DataSource/DataSink loop to test a web service.
To make life more fun, I need to pull from four distinct source files, all of which will cause different expected results.
I'd really like to do this in a single test loop, because having scripts with multiple loops tends to crash SoapUI more often than not, but the sticking point is assertions.
How can I enable or disable assertions in a Groovy script in SoapUI? GetData doesn't give me anything to hook onto, and a documentation dive did not reveal the proper syntax. I'd assume something like testCase.assertion, but there's no such property as "assertion" on testCase.
Alternately, can I use a Groovy script to change the assertion's content? In other words, if I want phrase X with file 1, phrase Y with file 2, I'm just as happy using the same assertion, so long as I can change the content it's trying to match.
You could use your Groovy script to set some kind of property testCase.setPropertyValue('expected', 'value'), based on which file you are reading. You could then use property expansion ${testCase#expected#} in the assertion content.
I'd like to run just a single cucumber feature file on autotest. I'd like the test to be run, report failures, then run again as soon as I save a change to my code base. Anyone know a way to do this?
--Jack
I found a solution myself:
Watchr - https://github.com/mynyml/watchr
It watches whenever you save specified files and runs specified tests at that point. Uses pattern matching.