From eb88aa4985fb85ef17f50a2ac83f848669bba7c5 Mon Sep 17 00:00:00 2001 From: Prital Patel Date: Sat, 9 Jul 2016 16:33:56 +0530 Subject: [PATCH 1/4] update readme --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 66ec74658f..2aa8552b7e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -[Browser Automated Tests for Joomla! CMS(covering Users and Content features - GSoC1 16)](https://summerofcode.withgoogle.com/projects/#5724182314745856) +[Browser Automated Tests for Joomla! CMS(covering Users and Content features - GSoC 16)](https://summerofcode.withgoogle.com/projects/#5724182314745856) === Abstract --- -System development nowadays more than ever starts to look for automated test methods. There are several main drivers for this trend -need for faster design‐develop‐test‐analysis cycle, push for higher quality, increasing complexity of systems and their integration and last but not least ever‐rising costs of manual testing. Software testing itself is very wide field with topics ranging from compliance frameworks. +System development nowadays more than ever starts to look for automated test methods. There are several main drivers for this trend need for faster design‐develop‐test‐analysis cycle, push for higher quality, increasing complexity of systems and their integration and last but not least ever‐rising costs of manual testing. Software testing itself is very wide field with topics ranging from compliance frameworks. Automation Testing means using an automation tool to execute test case suite. The automation software can also enter test data into the System Under Test, compare expected and actual results and generate detailed test reports. @@ -86,7 +86,7 @@ _We are using `composer.json` file for `tests` folder, so that you will have to ### Run tests -To run the tests please execute the following commands. We are usin [Robo.li](http://robo.li/) to execute the tests. +To run the tests please execute the following commands. We are using [Robo.li](http://robo.li/) to execute the tests. #### To execute all the test features you should use. @@ -110,6 +110,8 @@ $ tests/vendor/bin/codecept run tests/acceptance/users.feature _If you want to see steps then you can use `--steps` option of codeceptio. Check [full codecept command list here](http://codeception.com/docs/reference/Commands#Run)_ +**Note**:You can modify the timeout time by changing the value of **TIMEOUT** constant lower for fast machines and higher for slow computers. The **TIMEOUT** constant located in file tests/acceptance/_bootstrap.php + Do you have suggestions? --- Please create an issue here https://github.com/joomla-projects/gsoc16_browser-automated-tests/issues we will be happy to discuss and improve project. From 69e42c699f0cf5fcc438b8dfdf463a5c83f08c30 Mon Sep 17 00:00:00 2001 From: Prital Patel Date: Sun, 10 Jul 2016 17:28:41 +0530 Subject: [PATCH 2/4] Update README.md for TIMEOUT --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2aa8552b7e..d2c091af80 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ $ tests/vendor/bin/codecept run tests/acceptance/users.feature _If you want to see steps then you can use `--steps` option of codeceptio. Check [full codecept command list here](http://codeception.com/docs/reference/Commands#Run)_ -**Note**:You can modify the timeout time by changing the value of **TIMEOUT** constant lower for fast machines and higher for slow computers. The **TIMEOUT** constant located in file tests/acceptance/_bootstrap.php +**Note**:You can modify the timeout time by setting the value of **TIMEOUT** constant lower for fast machines and higher for slow computers. The constant located in file tests/acceptance/_bootstrap.php Do you have suggestions? --- From f782372d78e64367fa9a8ebe37310e89e39b3da4 Mon Sep 17 00:00:00 2001 From: Prital Patel Date: Mon, 11 Jul 2016 22:04:35 +0530 Subject: [PATCH 3/4] correct typo and improvement --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d2c091af80..5a6823ea11 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,12 @@ Abstract --- -System development nowadays more than ever starts to look for automated test methods. There are several main drivers for this trend need for faster design‐develop‐test‐analysis cycle, push for higher quality, increasing complexity of systems and their integration and last but not least ever‐rising costs of manual testing. Software testing itself is very wide field with topics ranging from compliance frameworks. - +System development nowadays more than ever starts to look for automated test methods. There are several main drivers for this trend, ++ Need for faster design‐develop‐test‐analysis cycle ++ Push for higher quality ++ Increasing complexity of systems and their integration and last but not least ++ Ever‐rising costs of manual testing + Automation Testing means using an automation tool to execute test case suite. The automation software can also enter test data into the System Under Test, compare expected and actual results and generate detailed test reports. Test Automation demands considerable investments of money and resources. Successive development cycles will require execution of same test suite repeatedly. Using a test automation tool it's possible to record this test suite and re-play it as required. Once the test suite is automated, no human intervention is required. @@ -86,7 +90,7 @@ _We are using `composer.json` file for `tests` folder, so that you will have to ### Run tests -To run the tests please execute the following commands. We are using [Robo.li](http://robo.li/) to execute the tests. +To run the tests please execute the following commands. We are using [Robo.li](http://robo.li/) to execute [PhpUnit](https://phpunit.de/) based [Codeception](http://codeception.com/for/joomla) test suits. #### To execute all the test features you should use. @@ -110,7 +114,7 @@ $ tests/vendor/bin/codecept run tests/acceptance/users.feature _If you want to see steps then you can use `--steps` option of codeceptio. Check [full codecept command list here](http://codeception.com/docs/reference/Commands#Run)_ -**Note**:You can modify the timeout time by setting the value of **TIMEOUT** constant lower for fast machines and higher for slow computers. The constant located in file tests/acceptance/_bootstrap.php +**Note**:You can modify the timeout time by setting the value of **TIMEOUT** constant lower for fast machines and higher for slow computers. The constant located in the file `tests/acceptance/_bootstrap.php` Do you have suggestions? --- From db509ec96cba865a05f573512a236bdd21f02aa9 Mon Sep 17 00:00:00 2001 From: Prital Patel Date: Thu, 21 Jul 2016 17:27:30 +0530 Subject: [PATCH 4/4] add how to create snippets --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 5a6823ea11..e5fbe0a366 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ BDD Testing with Gherkin and Codeception * Examples ### Example +Create a .feature using command `tests/vendor/bin/codecept generate:feature acceptance content` + File `content.feature` contains, ```gherkin @@ -62,6 +64,41 @@ Feature: content And I save an article Then I should see the "Article successfully saved." message ``` +Generate snippets of .featuer file using command `tests/vendor/bin/codecept gherkin:snippets acceptance` + +```snippets +/** + * @Given There is a add content link + */ + public function thereIsAAddContentLink() + { + throw new \Codeception\Exception\Incomplete("Step `There is a add content link` is not defined"); + } + + /** + * @When I create new content with field title as :arg1 and content as a :arg2 + */ + public function iCreateNewContentWithFieldTitleAsAndContentAsA($arg1, $arg2) + { + throw new \Codeception\Exception\Incomplete("Step `I create new content with field title as :arg1 and content as a :arg2` is not defined"); + } + + /** + * @When I save an article + */ + public function iSaveAnArticle() + { + throw new \Codeception\Exception\Incomplete("Step `I save an article` is not defined"); + } + +``` +Copy the all snippets and put in stepobject file + +Create a stepobject file using command `tests/vendor/bin/codecept generate:stepobject acceptance Administrator/content` + +Define your step file path in `acceptance.suit.yml file` + +For Example `- Step\Acceptance\Administrator\Content` ### Installation