0

It is possible to generate two reports? I have one report for the test team with individual query. And I have have a second report for the development team with a different query.

All rules are located in the folder "jqassistant/myrule1.xml".

The report shows only one rule.

Is it possible to generate a second report via command line?

auertob
  • 15
  • 3
  • 1
    I'm not sure about the problem you're describing, so before giving a probably misleading answer I'd like to clarify a bit: You have different rules for the test & development teams and would like each of these groups having their rules executed with their own reports (rendered HTML from Asciidoc, etc.)? Are these different builds executed on CI servers? – Dirk Mahler Dec 11 '19 at 14:46
  • Thank you for your quick reply and sorry for my late reaction. Right, there are n-rules for developers and n-rules for testers for a project. Two rendered HTML reports should be generated for the two rule groups (adoc's). It is currently running locally. In the future, jQAssistant should run in the CI pipeline (Jenkins). If it is possible that the reports are generated in a build process? – auertob Jan 17 '20 at 10:17

1 Answers1

0

jQAssistant allows to define different groups including concepts, constraints or even nested groups. These can be used for different execution profiles, e.g.

 <group id="dev">
   <includeGroup refId="anyOtherGroup"/>
   <includeConstraint refId="naming:*"/>
   <includeConstraint refId="spring:*"/>
 </group>

 <group id="test">
   <includeConstraint refId="test:*"/>
 </group>

or in Asciidoc

[[dev]]
[role=group,includesConstraints="naming:*,spring:*",includesGroups="anyOtherGroup"]
== Development Rules

[[test]]
[role=group,includesConstraints="test:*"]
== Test Rules

These groups can be activated during execution, e.g. using the Maven plugin in a profile called dev:

<profiles>
  <profile>
    <id>dev</id>
    <build>
      <plugins>
        <plugin>
          <groupId>com.buschmais.jqassistant</groupId>
          <artifactId>jqassistant-maven-plugin</artifactId>
          <version>${jqassistant.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>scan</goal>
                <goal>analyze</goal>
              </goals>
              <configuration>
                <groups> 
                  <group>dev</group>
                </groups>
                <!--
                <reportProperties>
                  <asciidoc.report.directory>path/to/required/directory</asciidoc.report.directory>
                </reportProperties>
                -->
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
  </profile>
</profiles>

The following command will execute this profile:

mvn clean verify -Pdev
Dirk Mahler
  • 1,186
  • 1
  • 6
  • 7