Statistics
| Revision:

root / tmp / org.txm.core.tests / src / org / txm / scripts / macro / tests / RunTestMacro.groovy @ 1626

History | View | Annotate | Download (796 Bytes)

1
package org.txm.scripts.macro.tests
2

    
3
import java.io.File
4
import org.kohsuke.args4j.*
5
import groovy.transform.Field
6
import org.txm.rcp.swt.widget.parameters.*
7
import org.txm.Toolbox
8
import org.txm.rcp.commands.tests.*
9

    
10
@Field @Option(name="name", usage="The test name to run", widget="String", required=true, def="test1")
11
String name
12

    
13
@Field @Option(name="step", usage="step to execute, 0=all 1=export&test 2=test", widget="Integer", required=true, def="0")
14
int step
15

    
16
// Open the parameters input dialog box
17
if (!ParametersDialog.open(this)) return;
18

    
19
if (step < 0) step = 0;
20
if (step > 3) step = 2;
21

    
22
TestBench bench = GroovyTestBench.getTests();
23
Test test = bench.getTest(name)
24

    
25
if (test.run(step)) {
26
        println "$name -> OK see "+test.getLogs()
27
} else {
28
        println "$name -> KO see "+test.getLogs()
29
}