codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
230 stars 64 forks source link

I am running Botium-cli and Selenium in docker and when running the tests against my Chatbot, i am getting the below issue . #369

Closed testqaprj closed 4 years ago

testqaprj commented 5 years ago

I am running Botium-cli and Selenium in docker and when running the tests against my Chatbot, i am getting the below issue . Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

I used the command botium-cli run --convos convoname.

I am using docker on windows machine. I tired to install botium-cli on my local machine (windows 10).but still getting similar kind of issues. I used the command npm install -g botium-cli

botium-cli init botium-cli run The sample tests works fine but when i use my own botium.json file in the project directory and try to run i get this error. Please help me on this.

testqaprj commented 5 years ago

attaching the logs of Selenium webdriver

botium-selenium_1 | 05:28:12.046 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService) botium-selenium_1 | Starting ChromeDriver 76.0.3809.68 (420c9498db8ce8fcd190a954d51297672c1515d5-refs/branch-heads/3809@{#864}) on port 8070 botium-selenium_1 | Only local connections are allowed botium-selenium_1 | Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. botium-selenium_1 | [1568093292.051][SEVERE]: bind() failed: Cannot assign requested address (99) botium-selenium_1 | 05:28:12.188 INFO [ProtocolHandshake.createSession] - Detected dialect: OSS botium-selenium_1 | 05:28:12.228 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session cea02b772257e9505e1342d830b2b9db (org.openqa.selenium.chrome.ChromeDriverService) botium-selenium_1 | 05:29:12.122 INFO [ActiveSessions$1.onStop] - Removing session cea02b772257e9505e1342d830b2b9db (org.openqa.selenium.chrome.ChromeDriverService)

testqaprj commented 5 years ago

image

codeforequity-at commented 5 years ago

I think this is more of a Selenium problem

attaching the logs of Selenium webdriver

botium-selenium_1 | 05:28:12.046 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService) botium-selenium_1 | Starting ChromeDriver 76.0.3809.68 (420c9498db8ce8fcd190a954d51297672c1515d5-refs/branch-heads/3809@{#864}) on port 8070 botium-selenium_1 | Only local connections are allowed botium-selenium_1 | Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. > botium-selenium_1 | [1568093292.051][SEVERE]: bind() failed: Cannot assign requested address (99) botium-selenium_1 | 05:28:12.188 INFO [ProtocolHandshake.createSession] - Detected dialect: OSS botium-selenium_1 | 05:28:12.228 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session cea02b772257e9505e1342d830b2b9db (org.openqa.selenium.chrome.ChromeDriverService) botium-selenium_1 | 05:29:12.122 INFO [ActiveSessions$1.onStop] - Removing session cea02b772257e9505e1342d830b2b9db (org.openqa.selenium.chrome.ChromeDriverService)

testqaprj commented 5 years ago

my botium.json looks like this "botium": { "Capabilities": { "PROJECTNAME": "My Botium Project", "CONTAINERMODE": "webdriverio", "WEBDRIVERIO_OPTIONS": { "desiredCapabilities": { "browserName": "chrome", "chromeOptions": { "w3c": false, "args": ["--headless", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage" ] }, "acceptSslCerts":true, "acceptInsecureCerts":true }, "protocol":"http", "host":"selenium", "port":"4444", "path":"/wd/hub"

Is anything required to be changed here ??

testqaprj commented 5 years ago

I tried with botium-cli init-dev command, then my tests starts running . image

testqaprj commented 5 years ago

what botium-cli init dev command does?? please tell how to run the tests with docker / local installation of Botium-cli in browser and headless way.

codeforequity-at commented 5 years ago

botium-cli init-dev is for generating boilerplate projects for developing Botium extensions: https://botium.atlassian.net/wiki/spaces/BOTIUM/pages/24477705/Developing+Custom+Asserters

You can find documentation for all Botium capabilities you need in the Webdriver connector repository: https://github.com/codeforequity-at/botium-connector-webdriverio

For how to use Webdriver.io for launching a headless chrome browser, there are other sources of information (https://webdriver.io/docs/options.html, https://medium.com/@mannyluvstacos/using-headless-chrome-for-your-selenium-tests-with-webdriverio-ce99b09d564), but I think your WEBDRIVERIO_OPTIONS settings are ok.

testqaprj commented 5 years ago

Thanks for the help !!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.