serenity-bdd / serenity-jira

14 stars 27 forks source link

Custom field and release tab not working in serenity reports #70

Open rajesh-kumar opened 7 years ago

rajesh-kumar commented 7 years ago

Hi Team,

I am using following versions to run the reports -

serenity-cucumber:1.1.29 serenity-jira-requirements-provider:1.1.3-rc.5 serenity-maven-plugin:1.2.5-rc.6

with following serenity.properties: jira.url=xxxx jira.project=xxxxx jira.username=xxxx jira.password=xxxx jira.custom.field.10804=Acceptance Criteria jira.custom.narrative.field=Description serenity.jira.workflow.active=true serenity.jira.workflow=workflow.groovy serenity.requirement.types=epic, story

There is no error being thrown but in output folder there is no releases.html file hence "release" tab doesn't work at all. And, in story page I can see description being loaded but acceptance criteria field from JIRA is not read. We are running Jira version 5.

Could you please confirm what combination of version is working?

I will post sample pom.xml in next comment.

rajesh-kumar commented 7 years ago

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

4.0.0
<parent>
    <artifactId>xxxxxx</artifactId>
    <groupId>xxxxxxxx</groupId>
    <version>1.0.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
</parent>

<artifactId>test-framework</artifactId>
<name>Testing Framework</name>
<packaging>jar</packaging>

<properties>
    <webdriver.driver>firefox</webdriver.driver>
    <serenity.requirements.version>1.1.3-rc.5</serenity.requirements.version>
    <serenity.maven.version>1.2.5-rc.6</serenity.maven.version>
</properties>
<dependencies>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber</artifactId>
        <version>1.1.29</version>
    </dependency>       
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-jira-requirements-provider</artifactId>
        <version>${serenity.requirements.version}</version>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-jira-customfield-requirements-provider</artifactId>
        <version>${serenity.requirements.version}</version>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
                <includes>
                    <include>**/*.java</include>
                </includes>
                <argLine>-Xmx512m</argLine>
                <systemPropertyVariables>
                    <webdriver.driver>${webdriver.driver}</webdriver.driver>
                </systemPropertyVariables>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.maven.version}</version>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>net.serenity-bdd</groupId>
                    <artifactId>serenity-jira-requirements-provider</artifactId>
                    <version>${serenity.requirements.version}</version>
                </dependency>
                <dependency>
                    <groupId>net.serenity-bdd</groupId>
                    <artifactId>serenity-jira-customfield-requirements-provider</artifactId>
                    <version>${serenity.requirements.version}</version>
                </dependency>
            </dependencies>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-jira-plugin</artifactId>
            <version>${serenity.requirements.version}</version>
        </plugin>
    </plugins>
</build>

rajesh-kumar commented 7 years ago

Hi Team, any updates please for at least custom field?

1) I want "Acceptance Criteria" to appear in report. I added following config but it doesn't do anything. Any pointers please?

jira.custom.field.10804=Acceptance Criteria

2) Also, could you please update the last code line of function "findOptionsForCascadingSelect(String fieldName)" of Class "JerseyJiraClient" with following code -

if(entry.getAsJsonArray("allowedValues")!=null) result.addAll(convertToCascadingSelectOptions(entry.getAsJsonArray("allowedValues")));

Aggregation of reports fail without above check for us because we had a custom field with name "Requirements". Please do this change on top of v1.1.3-rc.5

wakaleo commented 7 years ago

On point 2, could you please raise a PR?