Debugging of the Engine if it is a separate process #758
denis-fokin
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The UintTestBot Java engine can be run from CLI, IntelliJ plugin or as a Java API. The current implementation tightly coupled with bootstrap Java version of the engine process. It is not an issue for CLI and Java API. In case of IntelliJ IDE integration, it is a serious problem. We would prefer to use the same Java for generated test run, engine execution and the concrete executor processes bootstrapping. Such an approach may minimize chances of Class divergence. This approach is difficult to implement on IntelliJ Idea platform because the platform runs plugins in the process of the IDE. Currently, most versions of IDE are bundled with a fork of OpenJDK 11. There is already a version of IDE that is bundled with Java 17.
Let’s assume we successfully extracted the UnitTestBot in a separate process. In order to preserve development process comfortable and rapid we should minimize efforts in the application debugging.
There are several approaches to the debug process:
Old School
Remote debugging is used. A developer is provided with a
Debug configuration
, the configuration starts and waits for a bunch of debug processes, namelyPlugin process
,Engine process
,Concrete executor process
. As soon as a process starts, it connects to a specified port of IDE. All processes are debugged in parallel. In order to stop or kill all the processes, the developer is supposed to use dedicated buttons. Optionally, the developer can specify an option that bound the IDE not to stop the debugging process onConcrete executor
completion but wait for another connection on the same port.Skip First
An alternative solution can skip the plugin process by default. Reasoning for this is importance of the
Engine process
, which is a cornerstone of the UnitTestBot product.Remote debugging is used. A developer is provided with a
Debug configuration
, the configuration starts and runs thePlugin process
, after that the debugger waits for theEngine process
and optionally opens ports forConcrete executor process
.This approach sounds more robust, because the
Engine process
is the first-class citizen in the debugging process. Additionally, if the communication protocol works normally, it works as a contract and in most situations, it will be enough to check that the Plugin passes correct data and we are submitting correct data back to the Plugin or to concrete executors.Conclusion
Extraction of the Engine machinery in a separate process gives benefits from point of implementation encapsulation, safety and flexibility of environment setup. Please, share your thoughts on the topic.
Beta Was this translation helpful? Give feedback.
All reactions