-
Notifications
You must be signed in to change notification settings - Fork 18
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:
- Clone the repository:
git clone https://github.com/cucumber/cucumber-java-skeleton.git - Navigate to the
mavendirectory:cd cucumber-java-skeleton/maven - Add the
appmap-maven-pluginto thepom.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>
- Run the tests:
mvn test - Expected behavior: An
appmapdirectory containing.appmap.jsonfiles is created. - Actual behavior: The tests pass, but no AppMap data is generated.