Skip to content

Generating correct correlationId when suite name is overridden#461

Merged
tkaik merged 8 commits intowttech:masterfrom
wblachowski:bugfix/correlationID-name-overriding
Feb 15, 2019
Merged

Generating correct correlationId when suite name is overridden#461
tkaik merged 8 commits intowttech:masterfrom
wblachowski:bugfix/correlationID-name-overriding

Conversation

@wblachowski
Copy link
Copy Markdown
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
this.project = testSuiteRun.getProject();
this.domain = domain;
this.correlationId = testSuiteRun.getCorrelationId();
this.correlationId = CorrelationIdGenerator.generateCorrelationId(company, project, name);
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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