Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
b959e8ce
...
b959e8ce5ae1fce2dbb50be30ac86e5fbea039c6
authored
2013-12-10 10:51:39 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added clitest for XUnit report generation
1 parent
38d27611
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
tests/clitests/runtests.py
tests/clitests/runtests.py
View file @
b959e8c
...
...
@@ -408,5 +408,30 @@ class TestCommandOutputTest(CasperExecTestBase):
],
failing
=
True
)
class
XUnitReportTest
(
CasperExecTestBase
):
XUNIT_LOG
=
os
.
path
.
join
(
TEST_ROOT
,
'__log.xml'
)
def
setUp
(
self
):
self
.
clean
()
def
tearDown
(
self
):
self
.
clean
()
def
clean
(
self
):
if
os
.
path
.
exists
(
self
.
XUNIT_LOG
):
os
.
remove
(
self
.
XUNIT_LOG
)
def
test_xunit_report_passing
(
self
):
script_path
=
os
.
path
.
join
(
TEST_ROOT
,
'tester'
,
'passing.js'
)
command
=
'test
%
s --xunit=
%
s'
%
(
script_path
,
self
.
XUNIT_LOG
)
self
.
runCommand
(
command
,
failing
=
False
)
self
.
assertTrue
(
os
.
path
.
exists
(
self
.
XUNIT_LOG
))
def
test_xunit_report_failing
(
self
):
script_path
=
os
.
path
.
join
(
TEST_ROOT
,
'tester'
,
'failing.js'
)
command
=
'test
%
s --xunit=
%
s'
%
(
script_path
,
self
.
XUNIT_LOG
)
self
.
runCommand
(
command
,
failing
=
True
)
self
.
assertTrue
(
os
.
path
.
exists
(
self
.
XUNIT_LOG
))
if
__name__
==
'__main__'
:
unittest
.
main
()
...
...
Please
register
or
sign in
to post a comment