Skip to content

Commit

Permalink
review notes added
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinGroscheTT committed Aug 17, 2020
1 parent 301b9b4 commit f4d5a68
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 22 deletions.
Expand Up @@ -73,7 +73,7 @@ public class TestEnvContributor extends EnvironmentContributor {
public static final String TEST_TIMEOUT = "TEST_TIMEOUT_";

/**
* Build environment variable part for the timeout running the test.
* Build environment variable part for the output parameter.
*/
public static final String TEST_RETVAL = "TEST_RETVAL_";

Expand All @@ -99,7 +99,7 @@ public void buildEnvironmentFor(@Nonnull final Run r, @Nonnull final EnvVars env
envs.put(PREFIX + TEST_RESULT + id, action.getTestResult());
envs.put(PREFIX + TEST_TIMEOUT + id, String.valueOf(action.getTimeout()));
for (Map.Entry<String, String> outParam : outParams.entrySet()) {
envs.put(PREFIX + TEST_RETVAL + outParam.getKey() + "_" + id, outParam.getValue());
envs.put(PREFIX + TEST_RETVAL + outParam.getKey(), outParam.getValue());
}
}
}
Expand Down
Expand Up @@ -60,14 +60,14 @@ public AbstractTestClient(final String testFile, final TestConfig testConfig,
* @param testFile the test file path
* @param testConfig the test configuration
* @param executionConfig the execution configuration
* @param outParams the test output parameters
* @param outputParameters the test output parameters
*/
public AbstractTestClient(final String testFile, final TestConfig testConfig,
final ExecutionConfig executionConfig, final Map<String, String> outParams) {
final ExecutionConfig executionConfig, final Map<String, String> outputParameters) {
this.testFile = StringUtils.trimToEmpty(testFile);
this.testConfig = testConfig;
this.executionConfig = executionConfig;
this.outputParameters = outParams;
this.outputParameters = outputParameters;
testName = "";
testDescription = "";
testReportDir = "";
Expand Down Expand Up @@ -270,22 +270,22 @@ protected static final class TestInfoHolder implements Serializable {
private final String testResult;
private final String testReportDir;
private final boolean isAborted;
private final Map<String, String> outputParam;
private final Map<String, String> outputParameters;

/**
* Instantiates a new {@link TestInfoHolder}.
*
* @param testResult the test result
* @param testReportDir the test report directory
* @param isAborted specifies whether test execution is aborted
* @param outParam the output parameter map
* @param outputParameters the output parameter map
*/
public TestInfoHolder(final String testResult, final String testReportDir, final boolean isAborted,
final Map<String, String> outParam) {
final Map<String, String> outputParameters) {
this.testResult = testResult;
this.testReportDir = testReportDir;
this.isAborted = isAborted;
this.outputParam = outParam;
this.outputParameters = outputParameters;
}

public String getTestResult() {
Expand All @@ -300,8 +300,8 @@ public boolean isAborted() {
return isAborted;
}

public Map<String, String> getOutputParam() {
return outputParam;
public Map<String, String> getOutputParameters() {
return outputParameters;
}
}

Expand Down
Expand Up @@ -103,7 +103,7 @@ public boolean runTestCase(final FilePath workspace, final Launcher launcher, fi
setTestResult(testInfo.getTestResult());
setTestReportDir(testInfo.getTestReportDir());
setAborted(testInfo.isAborted());
setOutputParameters(testInfo.getOutputParam());
setOutputParameters(testInfo.getOutputParameters());
} else {
return false;
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2019 TraceTronic GmbH
* Copyright (c) 2015-2020 TraceTronic GmbH
*
* SPDX-License-Identifier: BSD-3-Clause
*/
Expand All @@ -21,7 +21,7 @@
import java.util.Objects;

/**
* Class holding a package variables.
* Class holding a package output parameter name.
*/
public class PackageOutputParameter extends AbstractDescribableImpl<PackageOutputParameter> implements Serializable,
ExpandableConfig {
Expand Down
Expand Up @@ -8,7 +8,7 @@ description=Test description
expand=[Expand All]
file=Full path to related test file
name=Name of the executed test
outputParameters=Test output parameter
outputParameters=Test output parameters
parameters=Test parameters
report=Full path to test report directory
result=Test result (SUCCESS, INCONCLUSIVE, FAILED, ERROR, NONE)
Expand Down
Expand Up @@ -8,7 +8,7 @@ description=Testbeschreibung
expand=[Alles erweitern]
file=Absoluter Pfad zur Testdatei
name=Name des ausgef\u00FChrten Tests
outputParameters=Testoutputparameter
outputParameters=R\u00FCckgabe-Parameter
parameters=Testparameter
report=Absoluter Pfad zum Testreportverzeichnis
result=Testergebnis (SUCCESS, INCONCLUSIVE, FAILED, ERROR, NONE)
Expand Down
Expand Up @@ -24,7 +24,7 @@ ImportProjectBuilder.DisplayName=[TT] Projekte importieren
ImportProjectBuilder.PrzFileExtension=Archiv muss vom Dateityp ".prz" sein.
ImportProjectConfig.DisplayName=Projekt aus Testmanagementsystem importieren
ImportProjectDirConfig.DisplayName=Projektverzeichnis aus Testmanagementsystem importieren
PackageOutputParameter.InvalidName=Parameteroutputname muss alphanumerisch sein. Er kann Unterstriche \
PackageOutputParameter.InvalidName=R\u00FCckgabe-Parameter muss alphanumerisch sein. Er kann Unterstriche \
enthalten aber darf nicht mit einer Zahl beginnen oder Umlaute beinhalten.
PackageParameter.InvalidName=Parametername muss alphanumerisch sein inklusive Unterstrich und darf nicht mit einer \
Zahl beginnen.
Expand Down
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2015-2019 TraceTronic GmbH
Copyright (c) 2015-2020 TraceTronic GmbH
SPDX-License-Identifier: BSD-3-Clause
-->
Expand Down
@@ -1,5 +1,5 @@
#
# Copyright (c) 2015-2019 TraceTronic GmbH
# Copyright (c) 2015-2020 TraceTronic GmbH
#
# SPDX-License-Identifier: BSD-3-Clause
#
Expand Down
@@ -1,8 +1,8 @@
#
# Copyright (c) 2015-2019 TraceTronic GmbH
# Copyright (c) 2015-2020 TraceTronic GmbH
#
# SPDX-License-Identifier: BSD-3-Clause
#
outputParameters.delete=Output Parameter l\u00F6schen
outputParameters.name=Name

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2019 TraceTronic GmbH
* Copyright (c) 2015-2020 TraceTronic GmbH
*
* SPDX-License-Identifier: BSD-3-Clause
*/
Expand Down Expand Up @@ -74,6 +74,7 @@ public void testWithTestPackageEnvInvisibleAction() throws Exception {
envVars.get(TestEnvContributor.PREFIX + TestEnvContributor.TEST_RESULT + testId));
assertEquals("TT_TEST_TIMEOUT_0 should match env action", String.valueOf(testEnvAction.getTimeout()),
envVars.get(TestEnvContributor.PREFIX + TestEnvContributor.TEST_TIMEOUT + testId));
assertEquals("TT_TEST_RETVAL_0 should not exist",0, testEnvAction.getOutParams().size());
}

@Test
Expand Down

0 comments on commit f4d5a68

Please sign in to comment.