OUR NEWS
Our News / Web application acceptance tests
5/11/2019
Web application acceptance tests in gitlab-ci using codeception and selenium installed as docker container
Let’s assume we are running acceptance tests of our application during the testing stage in gitlab-ci. The runner starts the container with our web app, and then executes codeception acceptance tests using the selenium server using the google chrome browser. We are using a local gitlab server with a registered runner to execute our tests..gitlab-ci.yml looks like this:

job:
  services:
  - name: postgres:alpine
  alias: postgres
  - name: redis:alpine
  alias: redis
  - name: selenium/standalone-chrome
  alias: chrome
  - name: tophfr/mailcatcher
  alias: smtp
What could possibly go wrong? Actually, everything could go wrong. The problem is that selenium is a service in gitlab-ci.yml and it does not know the runner’s executor container IP address and cannot reach it by host name.
Indeed, if you check the executor’s host file you will see something like this:

$ cat /etc/hosts
127.0.0.1 localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0   ip6-localnet
ff00::0   ip6-mcastprefix
ff02::1   ip6-allnodes
ff02::2   ip6-allrouters
172.17.0.8    chrome 9a7c560fcc81
172.17.0.9    tophfr__mailcatcher 47ca8ed9a04a
172.17.0.9    tophfr-mailcatcher 47ca8ed9a04a
172.17.0.9    smtp 47ca8ed9a04a
172.17.0.8    selenium__standalone-chrome 9a7c560fcc81
172.17.0.8    selenium-standalone-chrome 9a7c560fcc81
172.17.0.10   runner-fc308d01-project-17- concurrent-0
But, if we look in the host file of the selenium container you won’t see any information about our web app container (runner-fc308d01-project-17-concurrent-0 with IP address 172.17.0.10)

127.0.0.1   localhost
::1         localhost ip6-localhost ip6-loopback
fe00::0	    ip6-localnet
ff00::0	    ip6-mcastprefix
ff02::1	    ip6-allnodes
ff02::2	    ip6-allrouters
172.17.0.8 	564756c8670d
This problem is something unexpected but, is not new. I have found a 2-year old issue on gitlab
https://gitlab.com/gitlab-org/gitlab-runner/issues/1042
However, container linking (including containers in the same network) is still not implementing in gitlab. So, the main container is able to call the service container, but the service container cannot call the main container.
One possible workaround can be the usage of environmental variables to deliver the container’s IP address into the codeception config and test files.
We can grab the container’s IP address from the main container’s host file. It can be done directly in .gitlab-ci.yml

script:
- export WEB_APP_IP="$(ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1)"
# will set WEB_APP_IP environment variable to 172.17.0.10
- export SMTP_IP=$(grep 'smtp' /etc/hosts | awk '{print $1}')
# will set SMTP_IP environment variable to 172.17.0.9
Now we can use the WEP_APP_IP variable to set the page URL in the acceptance.suite.yml

class_name: AcceptanceTester

modules:
  enabled:
    - WebDriver:
        host: chrome
        port: 4444
        browser: chrome
        window_size: 1024x768
        url: 'http://%WEB_APP_IP%'
        capabilities:
          unexpectedAlertBehaviour: 'accept'
    - Asserts
don’t forget to specify params: env in codeception.yml

namespace: frontend\tests
actor: Tester
paths:
  tests: tests
  log: tests/_output
  data: tests/_data
  helpers: tests/_support
settings:
  bootstrap: _bootstrap.php
  colors: true
  memory_limit: 1024M
modules:
  config:
    Yii2:
      configFile: 'config/test-local.php'
params: env
If you need to call one service container from another service container during your codeception test script MyCest.php, you can obtain the service container IP address from PHP
$this->mailClientURL = 'http://'.getenv('SMTP_IP');
OTHER NEWS
Opportunities to streamline processes and reduce costs
Have you had thoughts about how you can make changes to improve your business for our NEW normal? As small businesses are slowly reopening, this is still an unknown time.
Our News
21
May2020
Support in remote operations and ongoing projects
During COVID-19, we have been staying connected with our clients in support of improvement in remote operations and ongoing projects.
Our News
5
May2020
COVID-19: Maintaining the safety of our staff and clients.
Just like you, we have been doing our very best to navigate the COVID-19 crisis in a way that is both responsive and responsible, while maintaining the safety of our staff and clients.
Our News
31
March2020
FinTech Events in Chicago
Last week, I had the opportunity to attend the Digital Innovations and Challenges in FinTech & Financial Services event in Chicago.
Our News
4
March2020
IESE Alumni Event
Last week I had the pleasure to be a presenter at the IESE Alumni Event. It was great to meet peers from IESE Business School and exchange ideas about Innovation, AI, and Blockchain.
Our News
25
February2020
FinTech Mobile Application
We are happy to announce our most proudest project, FinTech mobile app. The app was developed to utilize the latest tech stack.
Our Technologies
24
January2020
REST Design Methodology
Here's a helpful tip, when developing an API, stick to the REST design methodology. Here we'll describe the requirements for the REST architecture.
Our News
19
December2019
API Contract
Ask any IT person, what’s the stumbling block in the Web Application Development? Majority of the time, the answer is the contract between the front-end and back-end teams.
Our News
5
December2019
Pitch Club in Detroit
Last week, I had the opportunity to attend an event called Pitch Club in Detroit. We had 3 companies present and may the best company win, with their Pitch.
Our News
7
November2019
Small Business Week in Halton Region
It has been a busy yet productive week, coming back from the long Thanksgiving weekend. This week within our community, it was Official Small Business Week in Oakville and Burlington.
Our News
24
October2019
An easy way to update reviews on your website
Sign up for 11am.io today and have reviews not only on Google, FB and other platforms but also on your website, if the customer would like to leave a review directly.
Our Technologies
11
October2019
Had a great time at the Digital Summit in Detroit
Had a great time at the Digital Summit in Detroit. I listened, learned and connected with some great people. I wanted to share with everyone some of my personal take aways during the Summit.
Our News
1
October2019
Google Chrome extension for MDland
As the world evolves and your company expands, there are many difficult obstacles you can come across. One particular challenge is adding a new web application that seamlessly integrates with already existing programs.
Our Technologies
11
September2019
Online reputation management
Are you a Digital Agency or Digital Expert where you help to Small Businesses improve local SEO? Cappers Application has developed a new way to help Digital Agencies that work on local SEO for their clients. 11am.io
New Applications
5
September2019
Cappers Applications Inc.
Welcome to our new, lighter and faster website. With the use of Gatsby - JavaScript site generator, we are able to create a static website, which combines the latest technology, ReactJS and GraphQL.
Our News
11
August2019