Shortcut to jump to Json/xml file based on file name
We're building our a REST Test framework using REST Assured. We plan to store the json payloads (and some other test data) in raw json files (and ocassionally xml files). We have a utility method, something like getTestData("MyTestPayload.json") - where “MyTestPayload.json” is located under "src/test/resources/TestData/TestPayloads". Is there any shortcut we can implement in IntelliJ IDEA which would allow us from the Java test to jump to the json file (based on it's name), similar to the “Go To Implementation” option for Java code ? We do have some wiggle room to update the getTestData method, so we could potentially pass a folder path in here too if it would help. Being able to view/jump to the payload from the test would be very beneficial as we have 100's of tests, and jumping to a file rather than having to scoll to it would be a great time saver.
I hope I've explained all of this ok. Thanks in advance for any help
请先登录再写评论。
Hello,
Generally, navigation should work out of the box if you set path from the resources root (e.g. “/TestData/TestPayloads.json”).