-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return final value of package variables #199
Return final value of package variables #199
Conversation
@@ -71,13 +72,20 @@ | |||
*/ | |||
public static final String TEST_TIMEOUT = "TEST_TIMEOUT_"; | |||
|
|||
/** | |||
* Build environment variable part for the timeout running the test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong description
@@ -90,6 +98,9 @@ public void buildEnvironmentFor(@Nonnull final Run r, @Nonnull final EnvVars env | |||
envs.put(PREFIX + TEST_REPORT + id, action.getTestReportDir()); | |||
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
param name is the key, no need for id
this.testFile = StringUtils.trimToEmpty(testFile); | ||
this.testConfig = testConfig; | ||
this.executionConfig = executionConfig; | ||
this.outputParameters = outParams; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
param names should match
@@ -246,18 +270,22 @@ private void setGlobalConstants(final ETComClient comClient, final Map<String, S | |||
private final String testResult; | |||
private final String testReportDir; | |||
private final boolean isAborted; | |||
private final Map<String, String> outputParam; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be consistent with naming, see AbstractTestClient.java
this.testResult = testResult; | ||
this.testReportDir = testReportDir; | ||
this.isAborted = isAborted; | ||
this.outputParam = outParam; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
param names should match
@@ -24,6 +24,8 @@ 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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
@@ -0,0 +1,17 @@ | |||
<!-- | |||
Copyright (c) 2015-2019 TraceTronic GmbH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2020
@@ -0,0 +1,7 @@ | |||
# | |||
# Copyright (c) 2015-2019 TraceTronic GmbH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2020
@@ -0,0 +1,8 @@ | |||
# | |||
# Copyright (c) 2015-2019 TraceTronic GmbH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2020
@@ -0,0 +1,93 @@ | |||
/* | |||
* Copyright (c) 2015-2019 TraceTronic GmbH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add new build var to README#environment-variables
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
outputParameters.add=Add Output Parameter | ||
outputParameters.advanced=Package Output Parameter | ||
outputParameters.description=The configured package output parameter remain available throughout the entire test \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description is misleading
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
outputParameters.add=Output Parameter hinzuf\u00FCgen | ||
outputParameters.advanced=Package Output Parameter | ||
outputParameters.description=Die konfigurierten Package-Output-Parameter stehen w\u00E4hrend der Testausf\u00FChrung \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description is misleading
@@ -24,6 +24,8 @@ 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=R\u00FCckgabe-Parameter muss alphanumerisch sein. Er kann Unterstriche \ | |||
enthalten aber darf nicht mit einer Zahl beginnen oder Umlaute beinhalten. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comma before "aber"
<j:set var="varName" value="${outParam.getKey()}"/> | ||
<tr class="child-${testId}"> | ||
<td class="tooltip" tooltip="${%outputParameters}"> | ||
TT_TEST_RETVAL_${varName}_${testId}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testId is obsolete
@@ -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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check positive case here
@@ -39,6 +40,7 @@ | |||
private String testReportDir; | |||
private String testResult; | |||
private boolean isAborted; | |||
private Map<String, String> outputParameters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to PackageClient class
* output parameter option in package config added * return value and display for output parameter implemented * review notes added * checkstyle warning fixed * tests and review notes added * packageInfo reverted * Correct naming for test info holder of packages * Tweak used wording in translations
Resolves #138
Screenshots: