Skip to content
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

Generating correct correlationId when suite name is overridden #461

Merged
merged 8 commits into from
Feb 15, 2019

Conversation

wblachowski
Copy link
Contributor

@wblachowski wblachowski commented Dec 24, 2018

I fixed generating correlationId with suite name overridden in command line. For details see #440.

Description

CorrelationId now contains overridden suite name instead of the value from XML file.

Motivation and Context

Closes #440

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have reviewed (and updated if needed) the documentation regarding this change

I hereby agree to the terms of the AET Contributor License Agreement.

@wblachowski wblachowski changed the title Generating correct correlationId when suite name is overriden Generating correct correlationId when suite name is overridden Dec 24, 2018
@@ -71,7 +71,7 @@ public TestSuiteRun(TestSuiteRun testSuiteRun, String name, String domain, List<
this.company = testSuiteRun.getCompany();
this.project = testSuiteRun.getProject();
this.domain = domain;
this.correlationId = testSuiteRun.getCorrelationId();
this.correlationId = CorrelationIdGenerator.generateCorrelationId(company, project, name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this class has 2 constructors and now the 2nd constructor could use the 1st one to reduce the amount of code, what do you think? E.g. 2nd constructors could be changed to:

public TestSuiteRun(TestSuiteRun testSuiteRun, String name, String domain, List<TestRun> tests) {
    this(name, testSuiteRun.getCompany(), testSuiteRun.getProject(), domain, tests);
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion, it seems like a reasonable thing to do.

@tkaik
Copy link
Contributor

tkaik commented Jan 17, 2019

Can you add some unit tests for TestSuiteRun or SuiteExecutor (see which fits better) which test if correlation ID is correct when the suite name is overriden? Just to make sure that noone will break this again accidentally when doing some refactoring :)

@tkaik tkaik merged commit b842606 into wttech:master Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The correlationID is not generated correctly when suite name is overriden
2 participants