diff --git a/test/runTest/client/client.js b/test/runTest/client/client.js
index 2cd05634ffe39a4e8503d1673aa4efdf576cceff..7f644eda2f0a2ada3f55bf0222a1c4173faa4a3a 100644
--- a/test/runTest/client/client.js
+++ b/test/runTest/client/client.js
@@ -109,6 +109,22 @@ const app = new Vue({
}).sort(sortFunc);
},
+ selectedTests() {
+ return this.fullTests.filter(test => {
+ return test.selected;
+ });
+ },
+ unfinishedTests() {
+ return this.fullTests.filter(test => {
+ return test.status !== 'finished';
+ });
+ },
+ failedTests() {
+ return this.fullTests.filter(test => {
+ return test.status === 'finished' && test.summary !== 'success';
+ });
+ },
+
currentTest() {
let currentTest = this.fullTests.find(item => item.name === this.currentTestName);
if (!currentTest) {
@@ -171,20 +187,20 @@ const app = new Vue({
runTests([testName]);
},
run(runTarget) {
- const tests = this.fullTests.filter(test => {
- if (runTarget === 'selected') {
- return test.selected;
- }
- else if (runTarget === 'unfinished') {
- return test.status !== 'finished';
- }
- else { // Run all
- return true;
- }
- }).map(test => {
- return test.name;
- });
- runTests(tests);
+ let tests;
+ if (runTarget === 'selected') {
+ tests = this.selectedTests;
+ }
+ else if (runTarget === 'unfinished') {
+ tests = this.unfinishedTests;
+ }
+ else if (runTarget === 'failed') {
+ tests = this.failedTests;
+ }
+ else {
+ tests = this.fullTests;
+ }
+ runTests(tests.map(test => test.name));
},
stopTests() {
this.running = false;
diff --git a/test/runTest/client/index.html b/test/runTest/client/index.html
index 64c2eba62f290d956fb6b19db1e27dcd5e9020a6..8706c3324bef0a65dfba166e8dbdaec68ae5d8ae 100644
--- a/test/runTest/client/index.html
+++ b/test/runTest/client/index.html
@@ -46,10 +46,11 @@ under the License.
@click="run('selected')"
@command="run"
>
- Run selected
+ Run selected ({{selectedTests.length}})
- Run unfinished
- Run all
+ Run unfinished ({{unfinishedTests.length}})
+ Run failed ({{failedTests.length}})
+ Run all ({{fullTests.length}})