# Test suite which works in katalon studio locally, fails when run on jenkins inside a katalon container

**URL:** <https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218>\
**Category:** Integrations\
**Tags:** jenkins, integrations, katalon-studio\
**Created:** [September 9, 2020, 9:00am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218 "2020-09-09T09:00:26Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreevamsi.yandrapu](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sreevamsi.yandrapu](https://forum.katalon.com/u/sreevamsi.yandrapu)\
**Post date:** [September 9, 2020, 9:00am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/1 "2020-09-09T09:00:26Z")

</div>

Hi,

We have a test suite which is running fine on the developer machine using katalon studio.  
We’re trying to automate this using Jenkins and Katalon docker image. It’s failing with the error below.

Attached is the Jenkins console output. Please help us resolve this issue.

[katalon\_job\_output.txt](https://forum.katalon.com/uploads/short-url/csQw78wexcumnkZBoRz55jBzDMr.txt) (280.5 KB)

Best Regards,  
Sreevamsi

---

<div class="post-metadata">

**Author:** ![Andrej\_Podhajsky](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/andrej_podhajsky/32/1055_2.png) [@Andrej\_Podhajsky](https://forum.katalon.com/u/Andrej_Podhajsky)\
**Post date:** [September 9, 2020, 9:59am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/2 "2020-09-09T09:59:45Z")

</div>

Hello,  
by reading log it seems you cannot reach application from docker running on jenkins.  
Try to check connection, from jenkins and from docker (correct proxy settings).  
a bit complicated solution is to use selenium grid during development and excution from CI/CD pipeline - this way it will be consistent.

---

<div class="post-metadata">

**Author:** ![ayesha.khanam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ayesha.khanam/32/16104_2.png) [@ayesha.khanam](https://forum.katalon.com/u/ayesha.khanam)\
**Post date:** [September 9, 2020, 10:34am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/3 "2020-09-09T10:34:19Z")

</div>

Hi @Andrej_Podhajsky  
Connection seems to be fine but we are still facing the same issue

---

<div class="post-metadata">

**Author:** ![ayesha.khanam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ayesha.khanam/32/16104_2.png) [@ayesha.khanam](https://forum.katalon.com/u/ayesha.khanam)\
**Post date:** [September 9, 2020, 10:35am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/4 "2020-09-09T10:35:31Z")

</div>

@helpdesk, @ThanhTo @duyluong @Chris_Trevarthen  
Could you please look into this issue and suggest

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [September 9, 2020, 12:21pm UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/5 "2020-09-09T12:21:29Z")

</div>

Hi @sreevamsi.yandrapu,

I agree with @Andrej_Podhajsky that the docker could not connect to your url. You can put this command before navigateToUrl to verity the page source after navigating:

```java
import com.kms.katalon.core.webui.driver.DriverFactory

WebUI.navigateToUrl(url)
println DriverFactory.getWebDriver().getPageSource()

```

---

<div class="post-metadata">

**Author:** ![sreevamsi.yandrapu](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sreevamsi.yandrapu](https://forum.katalon.com/u/sreevamsi.yandrapu)\
**Post date:** [September 10, 2020, 12:30pm UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/6 "2020-09-10T12:30:31Z")

</div>

Hi Duylong,

There seems to be no issue with the network as the telnet to the resolved ip and port is working. My testing team tried the code above and they’re still facing the same issue.

---

<div class="post-metadata">

**Author:** ![Andrej\_Podhajsky](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/andrej_podhajsky/32/1055_2.png) [@Andrej\_Podhajsky](https://forum.katalon.com/u/Andrej_Podhajsky)\
**Post date:** [September 10, 2020, 12:55pm UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/7 "2020-09-10T12:55:19Z")

</div>

> [@sreevamsi.yandrapu](#):
>
> no issue with the network as the telnet to the resolved ip and port is working

did you connect from telnet on docker on jenkins?

---

<div class="post-metadata">

**Author:** ![sreevamsi.yandrapu](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sreevamsi.yandrapu](https://forum.katalon.com/u/sreevamsi.yandrapu)\
**Post date:** [September 11, 2020, 6:22am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/8 "2020-09-11T06:22:07Z")

</div>

Hi Andrej\_Podhasjky,

Yes I did a ’ docker run -it katalonpctv bash’ to login to the container and ran telnet. It’s getting connected. Also, I used tcpdump on the machine running docker and saw back and forth traffic from the src and dest.

Best Regards,  
Sreevamsi

---

<div class="post-metadata">

**Author:** ![ayesha.khanam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ayesha.khanam/32/16104_2.png) [@ayesha.khanam](https://forum.katalon.com/u/ayesha.khanam)\
**Post date:** [September 11, 2020, 6:32am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/9 "2020-09-11T06:32:42Z")

</div>

@Andrej_Podhajsky

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [September 11, 2020, 6:35am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/10 "2020-09-11T06:35:09Z")

</div>

@sreevamsi.yandrapu

```auto
import com.kms.katalon.core.webui.driver.DriverFactory

WebUI.navigateToUrl(url)
println DriverFactory.getWebDriver().getPageSource()

```

Please share the execution log after you apply this code

---

<div class="post-metadata">

**Author:** ![anon46315158](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon46315158](https://forum.katalon.com/u/anon46315158)\
**Post date:** [September 11, 2020, 8:21am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/11 "2020-09-11T08:21:26Z")

</div>

what is the app url you are trying to reach? (if it is not a secret)  
the application is hosted in a private/vpn network or it is an internet application?  
can you log in to the container, as you did before, and try to grab the url using `curl` or `wget` ?  
chances are … you may have dns issues, so you have to inject the target ip of the url into the container host, using the `--add-host` option  
see:  
[https://www.thegeekdiary.com/how-to-add-new-host-entry-in-etc-hosts-when-a-docker-container-is-run/](https://www.thegeekdiary.com/how-to-add-new-host-entry-in-etc-hosts-when-a-docker-container-is-run/)

---

<div class="post-metadata">

**Author:** ![ayesha.khanam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ayesha.khanam/32/16104_2.png) [@ayesha.khanam](https://forum.katalon.com/u/ayesha.khanam)\
**Post date:** [September 11, 2020, 12:43pm UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/13 "2020-09-11T12:43:42Z")

</div>

@anon46315158@duyluong

---

<div class="post-metadata">

**Author:** ![anon46315158](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon46315158](https://forum.katalon.com/u/anon46315158)\
**Post date:** [September 11, 2020, 1:11pm UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/14 "2020-09-11T13:11:18Z")

</div>

as far as i can see, the url is reachable (and the page loaded) … so the issues may be caused by waiting time before attempting to reach the elements … or elements not being visible/intractable due to the headless driver.  
will let this to other ‘experts’ in locators and so on

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [September 14, 2020, 9:21am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/15 "2020-09-14T09:21:06Z")

</div>

Hi @ayesha.khanam,  
I saved the page source string in your previous execution to this file [test.html](https://forum.katalon.com/uploads/short-url/6uVrp3LG0waxuiOP6AnIHa8n9k9.html) (22.3 KB) and see that there is no element with locator on the page:  
**//\*[@id = ‘single-button’ and @type = ‘button’]**.

You put the get page source command after the delay keyword and increase the delay timeout (30s → 60s) before finding the element.

Thanks

---

<div class="post-metadata">

**Author:** ![ayesha.khanam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ayesha.khanam/32/16104_2.png) [@ayesha.khanam](https://forum.katalon.com/u/ayesha.khanam)\
**Post date:** [September 17, 2020, 9:08am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/16 "2020-09-17T09:08:07Z")

</div>

Hey @duyluong

Have added the delays, still the same issue

---

<div class="post-metadata">

**Author:** ![anuradha](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/anuradha/32/16103_2.png) [@anuradha](https://forum.katalon.com/u/anuradha)\
**Post date:** [September 17, 2020, 10:32am UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/17 "2020-09-17T10:32:31Z")

</div>

Wondering if the issue is same as i just raised:

> [@Docker network URL cannot be resolve inside Katalon Docker Container (Docker to Docker)](http://forum.katalon.com/t/docker-network-url-cannot-be-resolve-inside-katalon-docker-container/47445):
>
> Issue: When using an URL set by System.getenv inside a docker container. The url is not resolved by KATALON. But when doing: ping container\_name inside the container, it works. How to reproduce: Create a server app listening on port 80 inside docker. Create a katalon project inside docker create a docker network Run server app container (listening on port 80) connect server app container to docker network connect katalon container to docker network Run katalon container How to check if ur…

---

<div class="post-metadata">

**Author:** ![anon46315158](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon46315158](https://forum.katalon.com/u/anon46315158)\
**Post date:** [September 17, 2020, 12:29pm UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/18 "2020-09-17T12:29:03Z")

</div>

just for my curiosity:

```auto
Docker version 1.12.3, build 6b644ec

```

this is really old. is that Docker-in-Docker?

```auto
+ docker build -t katalonpctv .
Sending build context to Docker daemon 557.1 kB
Sending build context to Docker daemon 1.114 MB
Sending build context to Docker daemon 1.617 MB

Step 1/2 : FROM katalonstudio/katalon
 ---> 0ff422e21fbb
Step 2/2 : ADD project /tmp/project
 ---> ecd835534726

```

why do you need to build a new image, adding the project inside of it? you can simply bind-mount the project at the runtime in the container created using the official image … that will save some time at the execution.

however:

```auto
+ xvfb-run -s '-screen 0 1024x768x24'

```

this size is small. Have you tried running the test on your local machine at this screen size?  
Could be that due to the small size, your page is not rendered/displayed correctly therefore the elements you are trying to interact with are not reachable.

@anuradha no, it is not the same issue, since the page content it is received (see the log), therefore the url seems reachable.

@ayesha.khanam also, note that in your log you are exposing the api-key, you may wan’t to censor it …

---

<div class="post-metadata">

**Author:** ![ayesha.khanam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ayesha.khanam/32/16104_2.png) [@ayesha.khanam](https://forum.katalon.com/u/ayesha.khanam)\
**Post date:** [October 9, 2020, 2:01pm UTC](https://forum.katalon.com/t/test-suite-which-works-in-katalon-studio-locally-fails-when-run-on-jenkins-inside-a-katalon-container/47218/19 "2020-10-09T14:01:32Z")

</div>

@kazurayam can you please help me with this issue
