How to run separate test project during build


#1

I’m new to CI and I have my e2e tests in a separate java project (selenium) from the main projec build. How can I run this project during the build tests?


#2

Hi maybe this will help Not able to trigger REST call from deployment section running tests from different repository via API call


#3

Hi Kosta19, thanks for your reply. I solved my problem by cloning the test project during the dependencies phase of the main project build. I don’t know if it’s the best solution, but this way I can run my tests. I had to add a checkout SSH key in order to be able to clone the project, just to let know.

My new issue is that, when running the e2e tests, the website accessed need to call an API but get the error:

OPTIONS http://api.myapi.com:8080/api/auth net::ERR_NAME_NOT_RESOLVED

Any clue?


#4

The resolve error is referring to resolving the hostname, which in this case is api.myapi.com (does not include protocol or port). This is a DNS lookup failure. Somehow your program cannot figure out the IP address for api.myapi.com. My guess is you have an entry in your /etc/hosts file that lets you resolve this hostname locally. Assuming I am right, you will need to achieve the same thing in CI.


#5