sirinibin / qma-tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QMA Tests

This repository contains Acceptance tests for the QMA website written using Codeception framework (PHP based) configured with Selenium & Chrome Driver.

Set Up

1.Download Standalone Selenium Server

https://www.seleniumhq.org/download/

2.Download Chrome Web driver

http://chromedriver.chromium.org/downloads

3.Start the chrome web driver

 cd to Download location
 ./chromedriver

4.Start Selenium Server

Note: Make sure you have Java Installed in your system

cd to Download location
java -jar selenium-server-standalone-3.141.59.jar

5.Install PHP 7

Ubuntu:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3

Mac :

curl -s http://php-osx.liip.ch/install.sh | bash -s 7.2

6.Running Tests

cd qma-tests
php codecept.phar run --debug

7.Running Individual Test Example

cd qma-tests
php codecept.phar run tests/acceptance/LoginCest --debug

8.Edit codeception.yml to update Web App URL & Browser settings

# suite config
suites:
    acceptance:
        actor: AcceptanceTester
        path: .
        modules:
            enabled:
                - WebDriver:
                    url: http://100.24.131.250/qma_test/qmaweb
                    window_size: 1280x1200
                    browser: chrome
                    pageload_timeout: 120

                - \Helper\Acceptance
                
extensions:
    enabled: [Codeception\Extension\RunFailed]

9.Test Code Location

tests/acceptance

References

1.https://codeception.com/docs/03-AcceptanceTests

2.https://www.seleniumhq.org/download/

3.http://chromedriver.chromium.org/downloads

About


Languages

Language:HTML 65.9%Language:PHP 34.1%