parent
							
								
									6f0db1d193
								
							
						
					
					
						commit
						09671eb6fc
					
				|  | @ -4,8 +4,8 @@ Changes between 1.X and 1.1.1 | |||
| - moved dist/looponfailing from py.test core into a new  | ||||
|   separately released pytest-xdist plugin. | ||||
| 
 | ||||
| - new junitxml plugin: --xml=path will generate a junit style xml file | ||||
|   which is parseable e.g. by the hudson continous integration server. | ||||
| - new junitxml plugin: --junitxml=path will generate a junit style xml file | ||||
|   which is processable e.g. by the Hudson CI system.  | ||||
| 
 | ||||
| - new option: --genscript=path will generate a standalone py.test script | ||||
|   which will not need any libraries installed.  thanks to Ralf Schmitt.  | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ plugins = [ | |||
|     ('other testing domains, misc',  | ||||
|             'oejskit django xdist genscript'), | ||||
|     ('reporting and failure logging',  | ||||
|             'pastebin logxml xmlresult resultlog terminal',), | ||||
|             'pastebin junitxml xmlresult resultlog terminal',), | ||||
|     ('other testing conventions', | ||||
|             'unittest nose doctest restdoc'), | ||||
|     ('core debugging / help functionality',  | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ reporting and failure logging | |||
| 
 | ||||
| pastebin_ submit failure or test session information to a pastebin service. | ||||
| 
 | ||||
| logxml_ logging of test results in JUnit-XML format, for use with Hudson | ||||
| junitxml_ logging of test results in JUnit-XML format, for use with Hudson | ||||
| 
 | ||||
| xmlresult_ (external) for generating xml reports and CruiseControl integration | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,15 +12,15 @@ command line options | |||
| -------------------- | ||||
| 
 | ||||
| 
 | ||||
| ``--xml=path`` | ||||
|     create junit-xml style report file at the given path. | ||||
| ``--junitxml=path`` | ||||
|     create junit-xml style report file at given path. | ||||
| 
 | ||||
| Start improving this plugin in 30 seconds | ||||
| ========================================= | ||||
| 
 | ||||
| 
 | ||||
| 1. Download `pytest_logxml.py`_ plugin source code  | ||||
| 2. put it somewhere as ``pytest_logxml.py`` into your import path  | ||||
| 1. Download `pytest_junitxml.py`_ plugin source code  | ||||
| 2. put it somewhere as ``pytest_junitxml.py`` into your import path  | ||||
| 3. a subsequent ``py.test`` run will use your local version | ||||
| 
 | ||||
| Checkout customize_, other plugins_ or `get in contact`_.  | ||||
|  | @ -1,4 +1,4 @@ | |||
| .. _`pytest_logxml.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_logxml.py | ||||
| .. _`helpconfig`: helpconfig.html | ||||
| .. _`terminal`: terminal.html | ||||
| .. _`pytest_recwarn.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_recwarn.py | ||||
| .. _`unittest`: unittest.html | ||||
|  | @ -20,8 +20,7 @@ | |||
| .. _`pytest_tmpdir.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_tmpdir.py | ||||
| .. _`pytest_figleaf.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_figleaf.py | ||||
| .. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_hooklog.py | ||||
| .. _`logxml`: logxml.html | ||||
| .. _`helpconfig`: helpconfig.html | ||||
| .. _`junitxml`: junitxml.html | ||||
| .. _`plugin.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/plugin.py | ||||
| .. _`pytest_skipping.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_skipping.py | ||||
| .. _`checkout the py.test development version`: ../../install.html#checkout | ||||
|  | @ -40,6 +39,7 @@ | |||
| .. _`monkeypatch`: monkeypatch.html | ||||
| .. _`coverage`: coverage.html | ||||
| .. _`resultlog`: resultlog.html | ||||
| .. _`pytest_junitxml.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_junitxml.py | ||||
| .. _`django`: django.html | ||||
| .. _`xmlresult`: xmlresult.html | ||||
| .. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/1.2.0a1/py/plugin/pytest_unittest.py | ||||
|  |  | |||
|  | @ -9,8 +9,8 @@ loop on failing tests, distribute test runs to CPUs and hosts. | |||
| The `pytest-xdist`_ plugin extends py.test with some unique  | ||||
| test execution modes: | ||||
| 
 | ||||
| * Looponfail: run your tests in a subprocess.  After it finishes py.test | ||||
|   waits until a file in your project changes and then re-runs only the  | ||||
| * Looponfail: run your tests repeatedly in a subprocess.  After each run py.test | ||||
|   waits until a file in your project changes and then re-runs the previously | ||||
|   failing tests.  This is repeated until all tests pass after which again | ||||
|   a full run is performed.  | ||||
| 
 | ||||
|  |  | |||
|  | @ -8,9 +8,9 @@ import time | |||
| 
 | ||||
| def pytest_addoption(parser): | ||||
|     group = parser.getgroup("terminal reporting") | ||||
|     group.addoption('--xml', action="store", dest="xmlpath",  | ||||
|     group.addoption('--junitxml', action="store", dest="xmlpath",  | ||||
|            metavar="path", default=None, | ||||
|            help="create junit-xml style report file at the given path.") | ||||
|            help="create junit-xml style report file at given path.") | ||||
| 
 | ||||
| def pytest_configure(config): | ||||
|     xmlpath = config.option.xmlpath | ||||
|  | @ -9,7 +9,7 @@ from py._test.outcome import Skipped | |||
| default_plugins = ( | ||||
|     "default runner capture terminal mark skipping tmpdir monkeypatch " | ||||
|     "recwarn pdb pastebin unittest helpconfig nose assertion genscript " | ||||
|     "logxml doctest").split() | ||||
|     "junitxml doctest").split() | ||||
| 
 | ||||
| def check_old_use(mod, modname): | ||||
|     clsname = modname[len('pytest_'):].capitalize() + "Plugin"  | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ from xml.dom import minidom | |||
| 
 | ||||
| def runandparse(testdir, *args): | ||||
|     resultpath = testdir.tmpdir.join("junit.xml") | ||||
|     result = testdir.runpytest("--xml=%s" % resultpath, *args) | ||||
|     result = testdir.runpytest("--junitxml=%s" % resultpath, *args) | ||||
|     xmldoc = minidom.parse(str(resultpath)) | ||||
|     return result, xmldoc | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue