We want to show you how to build your own tests from scratch
We use a setup for our local Chrome browser. This is important to develop things. You can also go a way with the offical selenium docker chrome container and TigerVLC zu connect you. But on our daily work we use this.
For a client with a Mac we setup this little step tutorial. For windows user its a better way to go with npm packages.
Configure codeception.yml
- Add Webdriver Url and Host
- Add PHPBrowser Url
- Add REST Url
or use environment vars to make this run local. Please without the last "/".
export WEBDRIVER_URL="127.0.0.1" && export WEBSITE_URL="https://www.testurl.de"
Install Chromedriver to connect your Selenium server to your local browser. Can be that there is also a way to only use Chromedriver. But we do not know this so far ;)
brew install --cask chromedriver
Install a local Selenium server. It runs by default on port 4444
brew install selenium-server-standalone
vendor/bin/codecept g:cest acceptance {DIR}/{TestName}
selenium-server -port 4444
###Run your tests. The parameter --steps will show you the steps on the terminal. --html will generate a HTML report and -vvv gives you better verbose information.
vendor/bin/codecept run acceptance --steps --html -vvv
vendor/bin/codecept run acceptance Search --steps --html -vvv
vendor/bin/codecept run acceptance Search/SearchCest:autocompleteItemsMatchSearchWord --steps --html -vvv