Skip to content
Snippets Groups Projects
Commit eebfaeef authored by fedoreno's avatar fedoreno
Browse files

reorganized dependencies order and made JUnit report mandatory

SVN: 33251
parent 16da1d2b
No related branches found
No related tags found
No related merge requests found
......@@ -14,9 +14,7 @@
"common-test": "../common-test/common-test",
"dto": "models/dto"
},
deps: ['jquery', 'qunit',
'qunit-report',
'common-test', 'support/type_registry', 'support/stjs', 'support/Utils'],
// deps: ['jquery', 'qunit', 'qunit-report', 'common-test', 'support/type_registry', 'support/stjs', 'support/Utils'],
shim: {
"qunit": {
exports: "QUnit",
......@@ -29,10 +27,10 @@
deps: ['qunit'],
},
"common-test": {
deps: ['qunit'],
deps: ['qunit', 'qunit-report'],
},
'support/Utils': {
deps: ['support/type_registry']
deps: ['support/stjs', 'support/type_registry', 'common-test']
},
'support/stjs': {
deps: ['support/underscore-min.js']
......@@ -71,11 +69,10 @@
<script>
require(['jquery',
'qunit',
'qunit-report',
'openbis-v3-api-test'], function($,
'openbis-v3-api-test',
'support/Utils'], function($,
qunit,
rep,
tester) {
tester, thisOneIsHereOnlyToMakeSureEverythingIsLoadedTODORemoveMe) {
qunit.load();
qunit.start();
tester();
......
......@@ -111,13 +111,34 @@ public class JsTestCommonSelenium extends SeleniumTest
try
{
OpenbisJsCommonWebapp webapp = browser().goTo(location);
String junitReport = "";
for (int x = 0; x < 20; x++)
{
junitReport = webapp.getJunitReport();
if (junitReport.length() == 0) {
try
{
System.out.println("JUnit report is not there yet. Waiting...");
Thread.sleep(1000);
} catch (InterruptedException e)
{
}
} else
{
System.out.println("JUnit report has arrived.");
break;
}
}
int failedCount = webapp.getFailedCount();
File report =
new File("targets/dist/" + this.getClass().getSimpleName() + "/" + method
+ "/TEST-" + method + ".xml");
FileUtilities.writeToFile(report, webapp.getJunitReport());
FileUtilities.writeToFile(report, junitReport);
Assert.assertTrue("JUnit test report is empty", junitReport.length() > 0);
Assert.assertEquals(0, failedCount);
} finally
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment