开发者

Using jmockit with FitNesse

I'm having trouble getting FitNesse to play nice with jmockit.

I'm using version v20110104 of FitNesse and version 0.999.9 of jmockit.

I had some ClassDefNotFound exceptions being thrown, but those were solved by adding the following to my FitNesse root:

!define COMMAND_PATTERN {java -javaagent:../l开发者_JS百科ib/jmockit.jar}

Which is the location of my jmockit jar. However, now my tests that use jmockit hang in the "running" state, never to return.

I asked around on some FitNesse boards, and tried altering the command pattern like so:

!define COMMAND_PATTERN {java -javaagent:../lib/jmockit.jar -cp %p %m}

This defines the classpath (%p represents all defined path variables and %m represents the main java method)

This prevents the test from hanging, but I get a new exception:

    java.lang.IllegalStateException: Invalid context for the recording of expectations

I can't find much information about this exception.

Has anyone gotten the latest release of jmockit to work with FitNesse?


This link may help you: http://tech.dir.groups.yahoo.com/group/fitnesse/message/17815

Are you using jmockit inside the fixtures, or how? What purpose? I'm just curious, had never needed to mock anything in my acceptance tests.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜