Looking for help on use in openapi for TestTreeView (Junit result display)


When using Agilifier, we launch FIT tests as Junit tests.
I want to be able to go from a Junit test result in the corresponding FIT test page or FIT test result page.

Using Openapi and VirtualFiles, it is easy to get the class of a specific unit test.
But with FIT and Agilifier, this class is always the same (com.stuffedgiraffe.agilifier.junit.JUnitAcceptanceTest), and it is completely normal.

To get the good FIT test page, I can use the test name (which is created by transformation).
But for now, I did not found a way to get it, except by using this code:

It is not suitable for me to rely on toString().
I am forced to do that because of impossibility to cast the userObject in something available in the classpath. The user object class is a com.intellij.execution.junit2.TestProxy.

Is there a better way to do this ?


Jean-Philippe Hallot.

Please sign in to leave a comment.