Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
34d1ea9e
Commit
34d1ea9e
authored
May 30, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidated coverage report generation into one rake command.
Added diff coverage reports using diff-coverage tool.
parent
5eaa6aea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
25 deletions
+14
-25
doc/testing.md
+3
-2
jenkins/test.sh
+2
-1
rakefiles/tests.rake
+9
-22
No files found.
doc/testing.md
View file @
34d1ea9e
...
...
@@ -197,9 +197,10 @@ To view test coverage:
2.
Generate reports:
rake coverage
:html
rake coverage
3.
HTML reports are located in the
`reports`
folder.
3.
Reports are located in the
`reports`
folder. The command
generates HTML and XML (Cobertura format) reports.
## Testing using queue servers
...
...
jenkins/test.sh
View file @
34d1ea9e
...
...
@@ -84,7 +84,8 @@ rake phantomjs_jasmine_cms || TESTS_FAILED=1
rake phantomjs_jasmine_common/lib/xmodule
||
TESTS_FAILED
=
1
rake phantomjs_jasmine_common/static/coffee
||
TESTS_FAILED
=
1
rake coverage:xml coverage:html
# Generate coverage reports
rake coverage
[
$TESTS_FAILED
==
'0'
]
rake autodeploy_properties
...
...
rakefiles/tests.rake
View file @
34d1ea9e
...
...
@@ -119,30 +119,17 @@ task :test do
end
end
namespace
:coverage
do
desc
"Build the html coverage reports"
task
:html
=>
:report_dirs
do
TEST_TASK_DIRS
.
each
do
|
dir
|
report_dir
=
report_dir_path
(
dir
)
if
!
File
.
file?
(
"
#{
report_dir
}
/.coverage"
)
next
end
desc
"Build the html, xml, and diff coverage reports"
task
:coverage
=>
:report_dirs
do
TEST_TASK_DIRS
.
each
do
|
dir
|
report_dir
=
report_dir_path
(
dir
)
sh
(
"coverage html --rcfile=
#{
dir
}
/.coveragerc"
)
if
!
File
.
file?
(
"
#{
report_dir
}
/.coverage"
)
next
end
end
desc
"Build the xml coverage reports"
task
:xml
=>
:report_dirs
do
TEST_TASK_DIRS
.
each
do
|
dir
|
report_dir
=
report_dir_path
(
dir
)
if
!
File
.
file?
(
"
#{
report_dir
}
/.coverage"
)
next
end
# Why doesn't the rcfile control the xml output file properly??
sh
(
"coverage xml -o
#{
report_dir
}
/coverage.xml --rcfile=
#{
dir
}
/.coveragerc"
)
end
sh
(
"coverage html --rcfile=
#{
dir
}
/.coveragerc"
)
sh
(
"coverage xml -o
#{
report_dir
}
/coverage.xml --rcfile=
#{
dir
}
/.coveragerc"
)
sh
(
"diff-cover
#{
report_dir
}
/coverage.xml --html-report
#{
report_dir
}
/diff_cover.html --git-branch master...HEAD"
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment