getappmap / getappmap/appmap-java

Feature Request: Add support for Cucumber for Java

Ouverte
#308 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Java
Étoiles
88
Forks
17
Merge moyen
2 j 2 h
PR mergées (30 j)
1

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Reproduisez le problème dans le dépôt cucumber/cucumber-java-skeleton depuis son répertoire Maven, en utilisant la configuration de appmap-maven-plugin indiquée dans pom.xml et en exécutant mvn test. Le travail est considéré comme terminé lorsque les tests passent toujours et qu’un répertoire appmap contenant des fichiers .appmap.json est généré pour les scénarios Cucumber.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
testing-qa
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.