getappmap / getappmap/appmap-java

Feature Request: Add support for Cucumber for Java

Offen
#308 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Java
Sterne
88
Forks
17
Ø Merge
2 T. 2 Std.
Gemergte PRs (30 T.)
1

Beschreibung

Currently, the AppMap Java agent does not seem to recognize and record test executions run via Cucumber. When the AppMap Maven plugin is configured for a standard Cucumber for Java project, no .appmap.json files are generated, although the tests run successfully and the agent appears to attach to the process. This limits the ability to use AppMap's powerful debugging and analysis features in projects that rely on BDD with Cucumber.

Describe the solution you'd like

It would be highly beneficial for the AppMap Java agent to include support for Cucumber. This would likely involve hooking into the Cucumber test execution lifecycle (e.g., Before and After scenario hooks) to automatically start and stop AppMap recordings for each executed scenario. This would allow developers to generate AppMaps for their BDD tests seamlessly.

Describe alternatives you've considered

There are no clear alternatives at the moment. Without direct support, it's not possible to record AppMaps from our Cucumber test suites, which means we miss out on valuable insights during testing.

Additional context

A minimal, reproducible example can be created using the official cucumber/cucumber-java-skeleton project.

Steps to Reproduce:

  1. Clone the repository: git clone https://github.com/cucumber/cucumber-java-skeleton.git
  2. Navigate to the maven directory: cd cucumber-java-skeleton/maven
  3. Add the appmap-maven-plugin to the pom.xml:
    <plugin>
        <groupId>com.appland</groupId>
        <artifactId>appmap-maven-plugin</artifactId>
        <version>1.3.0</version>
        <executions>
            <execution>
                <goals>
                    <goal>prepare-agent</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    
  4. Run the tests: mvn test
  5. Expected behavior: An appmap directory containing .appmap.json files is created.
  6. Actual behavior: The tests pass, but no AppMap data is generated.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere das Problem im Repository cucumber/cucumber-java-skeleton aus dessen Maven-Verzeichnis mit der in pom.xml gezeigten appmap-maven-plugin-Konfiguration und durch Ausführen von mvn test. Als abgeschlossen gilt die Aufgabe, wenn die Tests weiterhin bestehen und ein appmap-Verzeichnis mit .appmap.json-Dateien für die Cucumber-Szenarien erzeugt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
testing-qa
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.