1 Problem Scenario
When we develop a new project, we may hope that testers can help me run some unit test cases after completing a new module function and passing the self-test, but we need to develop technology on this basis. New function, this is why we need to run multiple instances at the same time on our development PC to ensure the needs of development and internal testing. Let’s talk about how to implement this multi-instance running of the same project on IDEA.
2 Environment preparation
- JDK 1.8
- IDEA 2021.3.2
3 Configuration process
3.1 Running instance configuration
Modify the startup configuration of the current project
Set the project instance name
Enable multi-instance configuration
Set the current instance's Running port
Copy the current instance
Modify the name and running port of the copied instance
3.2 Set up the runtime group
Create a new running group
Modify the name of the running group and the startup instance in the running group
3.3 Run group startup test
After the above operations, the configuration is basically complete. Let’s run it here to see if both services can run normally.
AppRun-8009 started successfully
AppRun-8010 started successfully
OK, the configuration is over, and then let the test be performed on port 8010. We can continue to develop new business module functions on port 8009, and the matching will not affect each other. Of course, normally we should package it into a test environment to provide a stable environment for testers to conduct testing. We are only transferring tests internally and have not yet reached the integration stage. It is just a solution that can allow testers to intervene in the project as early as possible. Each company may have different requirements for project management, so just adjust it according to the actual situation.