programmatically import unit test results from xml into Junit view in IntelliJ
已回答
I want to programmatically import unit test results from xml file into Junit view in IntelliJ. This code opens file but only into the text editor.
Project project = ProjectManager.getInstance().getOpenProjects()[0];
File fileIO = new File("E:\\Work\\Sandbox2\\src\\test\\resources\\file.xml");
VirtualFile file = LocalFileSystem.getInstance().findFileByIoFile(fileIO);
OpenFileDescriptor descriptor = new OpenFileDescriptor(project, file);
descriptor.navigate(true);
Any suggestion how to modify code to get what I want ?
请先登录再写评论。
Please see the implementation of `com.intellij.execution.testframework.sm.runner.history.actions.AbstractImportTestsAction`
Thanks,
Anna