[wingide-users] problems with the command line unittest runner
Wingware Support
support at wingware.com
Fri Aug 17 09:59:31 MDT 2012
Pablo Adames wrote:
> I have difficulty with the syntax of the command line test runner:
> The Wing IDE help documentation says the option
> --output=file=<filename> should write xml output file when running
> src/testing/runners/run_unittest_xml.py
> I have tried also --output=<filename>, --outputfile=<filename>
> unsuccessfully. It does not recognize the parameter.
> So I get a stdout text that is not XML parser ready unless I edited it
> manually(!)
Looks like there is a typo in the docs. It should be
--output-file=<filename>
> I tried also the parallel test execution which is probably the most
> exciting feature that would make the tool worth using and it does not
> recognize it either:
> --one-process-per-module as per the help documentation.
> The script source code looks for the parameter
> --one-module-per-process in line 55:
> process_per_module = wingtest_common.PopFromArgv(argv,
> '--one-module-per-process')
> So I use it but it does not recognize it either (a sample command line
> and output after my signature)
Yes, the docs are wrong here too and I can't get that option working
either. I'll get back to you when I have more info on this part of the
problem.
> python "C:\Program Files (x86)\Wing IDE
> 4.1\src\testing\runners\run_unittests_xml.py"
> --one-module-per-process testComparisonEngine
Hmm, well, it took me quite a while of digging through source code to
figure out how to get this to work at all and here is one example that
does work, although without the --one-module-per-process option:
python ~/src/ide/src/testing/runners/run_unittests_xml.py
--output-file=test.xml -q test_textutils.CTextUtils.testQuotedSplit
The key things are the -q option followed by
modulename.classname.testName (not just testName by itself).
Sorry this is so poorly documented. I'll fix the docs and will get back
to you when we have a fix for the --one-module-per-process option.
Thanks for pointing out these problems!
--
Stephan Deibel
Wingware | Python IDE
Advancing Software Development
www.wingware.com
More information about the wingide-users
mailing list