runIdeForUiTests but with service mocks
已回答
I would like to run some UI tests for an IntelliJ plugin I am developing but I need to use mock services for the tests to be reliable. The default behavior is to use the service implementations (not mocks) when using said gradle task.
Is there a configuration I can enable on runIdeForUiTests to use the mock services?
请先登录再写评论。
Hi,
There is no out-of-the-box solution to this. You can try running the Gradle task with an additional system property:
In your service implementation, execute the mocked code in case System.getProperty("is.ui.test.mode") is true.