天天看點

ngrinder:在 idea中運作 nGrinder項目時提示”java.lang.UnsupportedOperationException“

提示:

”java.lang.UnsupportedOperationException“

java.lang.UnsupportedOperationException
	at net.grinder.scriptengine.groovy.junit.GrinderRunner.withBeforeProcess(GrinderRunner.java:268)
	at net.grinder.scriptengine.groovy.junit.GrinderRunner.classBlock(GrinderRunner.java:207)
	at net.grinder.scriptengine.groovy.junit.GrinderRunner.run(GrinderRunner.java:169)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)

           

原因:

JUNIT 版本不對導緻的,ngrinder使用的是groovy自帶的Junit,我目前使用的是ngrinder3.4.4版本,使用groovy2.4.15版本後是不會報這個錯了。

解決方法:

https://editor.csdn.net/md/?articleId=107765171

1、删除原來的groovy庫,我原來的是3.x版本:

ngrinder:在 idea中運作 nGrinder項目時提示”java.lang.UnsupportedOperationException“

2、下載下傳2.X的版本,重新添加groovy庫,參考

https://blog.csdn.net/weixin_42118880/article/details/107765171

繼續閱讀