I have a java project that runs thousands of test cases. I am using maven-surefire-plugin with testng. I want to profile these tests while they are running on the remote machine. It's basically a typical maven build process followed by running of test cases. I tried using the remote attach feature of JProfiler but that causes my test cases to keep executing. Is there a way that I can create a snapshot on the server while they are executing and analyze it later. Like some plugin/dependency that I can add to my project. I could see the options to take a heap dump with JProfiler but could not find the documentation for snapshots.
Tried using remote attach, but it's taking too long and test cases keep executing and never complete.