This commit is contained in:
Andreas Gal 2014-08-04 19:54:58 -07:00
Родитель 4d1e3e0897
Коммит 07d06897ac
5 изменённых файлов: 25 добавлений и 15 удалений

Просмотреть файл

@ -1,5 +1,8 @@
test: java/tests.jar java/classes.jar
casperjs --enginer=slimerjs test `pwd`/tests/automation.js
killall python || true
python -m SimpleHTTPServer &
casperjs --verbose --log-level=debug --engine=slimerjs test `pwd`/tests/automation.js
killall python || true
java/tests.jar: java/classes.jar
cd tests && make

Просмотреть файл

@ -21,15 +21,7 @@
</style>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<script type="text/javascript">
if (!window.TextDecoder) {
var script = document.createElement("script");
script.type = "text/javascript";
script.defer = true;
script.src = "encoding.js";
document.getElementsByTagName("head")[0].appendChild(script);
}
</script>
<script type="text/javascript" src="legacy.js" defer></script>
<script type="text/javascript" src="zipfile.js" defer></script>
<script type="text/javascript" src="timer.js" defer></script>
<script type="text/javascript" src="util.js" defer></script>

Просмотреть файл

@ -73,6 +73,6 @@ public class RunTests {
pass += harness.passed();
fail += harness.failed();
}
System.out.println("TOTAL: " + pass + " pass, " + fail + " fail");
System.out.println("DONE: " + pass + " pass, " + fail + " fail");
}
};

Просмотреть файл

@ -1,4 +1,19 @@
casper.test.begin("Hello, Test!", 1, function(test) {
test.assert(true);
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: set shiftwidth=4 tabstop=4 autoindent cindent expandtab: */
casper.on('remote.message', function(message) {
this.echo(message);
});
casper.test.begin("unit tests", 1, function(test) {
casper
.start("http://localhost:8000/index.html?main=RunTests")
.waitForText("DONE", function then() {
test.assertTextExists("DONE: 702 pass, 0 fail", "run unit tests");
}, function error() {
this.captureSelector('screen.png', 'body');
})
.run(function() {
test.done();
});
});