Skip to content

Commit

Permalink
Report generating update
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMartin committed Aug 12, 2024
1 parent f1c04ef commit 3feb6f8
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
Binary file modified examples/plugin-example/plugin/libs/natt-spi-1.1.0.jar
Binary file not shown.
Binary file modified examples/project-example/NATT.jar
Binary file not shown.
Binary file modified natt-config-editor/NATT.jar
Binary file not shown.
Binary file modified natt/libs/natt-spi-1.1.0.jar
Binary file not shown.
24 changes: 12 additions & 12 deletions natt/src/main/java/utb/fai/natt/keyword/Main/TestRootKw.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@
* Umoznuje definovat root struktur celeho testovani. Tato strukturma musi byt
* vzdy jako hlavni a musi byt na zacatku konfigurace
*/
@NATTAnnotation.Keyword(
name = "test_root",
description = "Marks the root element of the test configuration. It must be located at the beginning of the testing configuration. Tests start executing from this point.",
parameters = { "max_points", "initial_steps", "test_suites" },
types = { ParamValType.DOUBLE, ParamValType.LIST, ParamValType.LIST },
kwGroup = "NATT Main"
)
@NATTAnnotation.Keyword(name = "test_root", description = "Marks the root element of the test configuration. It must be located at the beginning of the testing configuration. Tests start executing from this point.", parameters = {
"max_points", "initial_steps",
"test_suites" }, types = { ParamValType.DOUBLE, ParamValType.LIST, ParamValType.LIST }, kwGroup = "NATT Main")
public class TestRootKw extends NATTKeyword {

// zpracovane parametry
Expand Down Expand Up @@ -65,7 +61,7 @@ public boolean execute(INATTContext ctx)
if (!keyword.execute(ctx)) {
passed = false;
}

try {
Thread.sleep(150);
} catch (InterruptedException e) {
Expand Down Expand Up @@ -118,10 +114,14 @@ public void init(INATTContext ctx) throws InvalidSyntaxInConfigurationException
/// //////////////////////////////////////////////////////////////////////////////////////////////////////

// pro logovani vysledu inicializacnich akci
this.result = new TestCaseResult("Test root initialization", null, "",
NATTContext.instance().getReportExtent());
this.result.includeInFinalScore(false);
NATTContext.instance().bindTestCaseResult(this.result);
if (initialSteps != null) {
if (!initialSteps.isEmpty()) {
this.result = new TestCaseResult("Test root initialization", null, "",
NATTContext.instance().getReportExtent());
this.result.includeInFinalScore(false);
NATTContext.instance().bindTestCaseResult(this.result);
}
}
}

@Override
Expand Down
23 changes: 12 additions & 11 deletions natt/src/main/java/utb/fai/natt/keyword/Main/TestSuiteKw.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@
/**
* Umoznuje definovat testovaci sadu
*/
@NATTAnnotation.Keyword(
name = "test_suite",
description = "Used to define a testing suite.",
parameters = { "name", "delay", "initial_steps", "test_cases" },
types = { ParamValType.STRING, ParamValType.LONG, ParamValType.LIST, ParamValType.LIST },
kwGroup = "NATT Main"
)
@NATTAnnotation.Keyword(name = "test_suite", description = "Used to define a testing suite.", parameters = { "name",
"delay", "initial_steps", "test_cases" }, types = { ParamValType.STRING, ParamValType.LONG, ParamValType.LIST,
ParamValType.LIST }, kwGroup = "NATT Main")
public class TestSuiteKw extends NATTKeyword {

protected NATTLogger logger = new NATTLogger(TestSuiteKw.class);
Expand Down Expand Up @@ -121,10 +117,15 @@ public void init(INATTContext ctx) throws InvalidSyntaxInConfigurationException
/// //////////////////////////////////////////////////////////////////////////////////////////////////////

// pro logovani vysledu inicializacnich akci
this.result = new TestCaseResult("Test suite '" + this.getName() + "' initialization", this.getName(), "",
NATTContext.instance().getReportExtent());
this.result.includeInFinalScore(false);
NATTContext.instance().bindTestCaseResult(this.result);
if (initialSteps != null) {
if (!initialSteps.isEmpty()) {
this.result = new TestCaseResult("Test suite '" + this.getName() + "' initialization", this.getName(),
"",
NATTContext.instance().getReportExtent());
this.result.includeInFinalScore(false);
NATTContext.instance().bindTestCaseResult(this.result);
}
}
}

@Override
Expand Down

0 comments on commit 3feb6f8

Please sign in to comment.