serenity-bdd / serenity-jira

14 stars 27 forks source link

feat: Starting with very basic Zephyr Support #74

Closed rajesh-kumar closed 7 years ago

rajesh-kumar commented 7 years ago

Hi Team,

I have written a very quick solution to update Zephyr test executions. It meets our requirement for now. I will work on adding more features later and send further requests in future.

serenity.jira.zephyr.active=true in serenity.properties should cover most basic scenarios for Zephyr execution updates. Three other properties have been added for the special case.

Summary of this PR

It adds very basic support to update Zephyr Tests if they are mapped to test case implementation in serenity framework.

Intended effect

Four properties have been added to support Zephyr Test Execution -

1) serenity.jira.zephyr.active=true

It should be enough to cover most of cases. It will check for all test executions available for a given JIRA ticket (as long as its type is Test) and will update all of them with their status (based on test outcome).

If a particular JIRA ticket doesn't have any test cycle/execution associated with it then it will automatically create default cycle with name "FUNCTIONALITY" and create new execution for that ticket.

2) serenity.jira.zephyr.default.cycle=FUNCTIONALITY

If you want to override the default Cycle Name (as explained in first property) then you can use this property and update its value to desirable one (i.e. Regression)

3)

serenity.jira.zephyr.update.selected.cycles=REGRESSION,FUNCTIONALITY serenity.jira.zephyr.update.selected.versions=Release 1.0.0 (only single value support for this right now)

Both above properties should be used together. If you want to restrict what cycles should be updated by serenity then you can add comma separated list in property "serenity.jira.zephyr.update.selected.cycles". And, the framework will only update Tests (tickets) that have above cycles associated along with that specific version. And, all others will be skipped.

How should this be manually tested?

How can reviewers verify the request has the intended effect?
Assumptions:

Then just do following:

Add first property mentioned above in serenity.properties file. And run the framework. It will create default cycle, attach "Test" ticket with that cycle, create new execution and update its status with the test result.

The feature of adding comments with execution status will be added in future.

Side effects

Does the pull request contain any side effects? No. If no one adds above-said properties in serenity.properties file there will be no effect.

Documentation

If the pull request is user facing, how is it documented? Have provided all the details above.

Relevant tickets

List of tickets, that are fixed or somehow related to this PR

60

Screenshots (if appropriate)

No change in Serenity core reporting. Only effects are seen on JIRA.

ricardorlg commented 7 years ago

@wakaleo, Is this PR going to be merged?

wakaleo commented 7 years ago

Apologies, I haven't had a chance to look at it yet. Will do so now.