Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy way to record from an existing integration test #17

Open
mkotsbak opened this issue Jun 23, 2010 · 5 comments
Open

Easy way to record from an existing integration test #17

mkotsbak opened this issue Jun 23, 2010 · 5 comments

Comments

@mkotsbak
Copy link
Contributor

How to practically start an existing maven test target and capture the result to JSON file.

@mkotsbak
Copy link
Contributor Author

Maybe a maven plugin needs to be written?

@ebaxt
Copy link
Contributor

ebaxt commented Oct 20, 2010

I was thinking the same thing, maybe something that binds to integration-test phase like the failsafe-plugin?

@mkotsbak
Copy link
Contributor Author

The important thing is to get it run with something like:

javaagent:${user.home}/.m2/repository/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar

and with the annotations in the classpath (easily fixed by dependency).

It should not run every time, just when you want to recorder it, so it should not bind to some usual phase, but more selected to run manually (like eclipse:eclipse).

@mkotsbak
Copy link
Contributor Author

Well, that could be run like we do in the test of jackbox:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <argLine>-javaagent:${user.home}/.m2/repository/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar</argLine>
            </configuration>
        </plugin>

just that we dont want to run it all the times. Is it possible to wrap it into another goal/phase?

And to be any useful, wee need to let jackbox save collected data to files, and thus some way to find where to put them (current directory until configuration system is in place?)

For the replay part, we want to run it each time against one data file, or run generated tests: http://github.com/oc/jackbox/issues#issue/12

@mkotsbak
Copy link
Contributor Author

Just for testing, the easiest is maybe to launch one of the JUnit clients from the command line, adding the above argLine, the jackbox jar and the code under test to classpath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants