why we go for automation with using codeception

Updated 15 December 2017

Facebook Linkedin

After a long discussion  in Codeception:

The main purpose of writing these blogs is to describe, how can we perform automation testing through Codeception with acceptance, functional and unit testing in creating ticket panel in UVdesk.

Here 5 Reason to Try Codeception:

1. PHP

As with PHP developer point of view, we always want to Write Test Cases in PHP, So Codeception provide us an easy method to write test cases in our own way. The biggest advantage of Codeception is BDD, behavioral driven development in which we write test cases in human-readable form.
BDD is popular ina software development methodology. Its tests are written as inhumanly readable scenarios and as soon you will view scenarios, you will understand how to use.

2. Simplicity

In Term of simplicity point of view, I described in below code and explained for user login panel in UVdesk :

Hereafter $I, we use fill field method and by this method, we can fill some data like an example, if we want to fill username, user email and user password and click method is used for a click as I explain above. So in term of simplicity, it is very useful for beginners. Also, we can select an action from a list like select method, click method, radio method, check method and after putting parameters we can start our automated code.

The installation process is very easy


3. Multi-framework and multi-backend

Suppose if we want to migrate our application from symfony1 to symfony2 and also to any other framework and we decided to test with selenium inside a real browser. Now our all Test cases are Run in that application which we choose, So Here in Codeception using one common syntax work for all application. we can also test in Opencart and Magento with this module.

4. Complex Tests

Here if any QA comes and says: I need XPath, I need complex selectors, I need to test UI elements strictly. No problems! you can use CSS selectors, XPath locators and even combined them in a locator class as well.

Below are the locators which are supported by Codeception and these are :

By Name
By Class Name
By Tag Name
By Link Text Or Partial Link Text
By cssSelector
By XPath
Below i explained about XPath Selectors and CSS Selectors:

By XPath:

By CSS Selectors:

5. Database Handling

Nowadays tests isolation is a problem which is facing by many testers. In  most  of  the testing application, we have to clean the database after performing a test in our application, the most important advantage of this application is by running simple commands, It automatically cleans a database before each test. But if you are beginners in the automation field, So you can start with Codeception because we discuss that in Codeception all test cases are easily readable for a non-technical guy, and If you still not decide that whether or not to perform Automation in an application, start doing it now with Codeception, because Codeception is the right tool for this.

The ways of loading a dumb in our data base is explained below:

Steps 1.

Simply put the dump in the  tests/_data directory (by default) and specify the path in the config. The next time after the database is cleared, all your data will be restored from the dump.

and By Running below commands in dump.sql file in terminal, then  your database will isolate automatically.

Category(s) Codeception UVdesk
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.