Running user code with specified input

Answered

User of plugin have some tests (String input and String expectedOutput) and I want to execute user code from plugin with input string and get program output to compare it with expectedOutput. I also don't want to show console. How can I make it? Can I make it using run configuration selected by the user? I found similar behaviou in https://github.com/JetBrains/educational-plugin when they test Codeforces tasks, for example. But code of this plugin is difficult for me to understand, they have their own checker system.

0
1 comment

You can write your custom RunConfiguration and return null from com.intellij.execution.configurations.CommandLineState#createConsole

https://plugins.jetbrains.com/docs/intellij/basic-run-configurations.html

0

Please sign in to leave a comment.