Skip to content

[Testing] Add basic setup and sample tests for Codeception System Tests#16743

Merged
rdeutz merged 174 commits intojoomla:stagingfrom
yvesh:coresystemtests
Jun 18, 2017
Merged

[Testing] Add basic setup and sample tests for Codeception System Tests#16743
rdeutz merged 174 commits intojoomla:stagingfrom
yvesh:coresystemtests

Conversation

@yvesh
Copy link
Copy Markdown
Member

@yvesh yvesh commented Jun 18, 2017

Summary of Changes

This pull request adds the basic setup and configuration for the Joomla browser based System Tests. It contains sample tests for com_users. During the next weeks more tests are going to be ported from the system tests repository
. Additionally Continuous Integration will be activated running the test suite for every PR and commit.

Testing Instructions

For a complete description check the README.md in tests/codeception

Prerequisites:

  • Webserver with PHP installed
  • Google Chrome
  • Composer
  • PHP 5.6 Cli (or later)
  • Java JDK (8 or later)

Step by Step:

  • Navigate in your terminal to tests/codeception
  • Do a composer install
  • cp and modify the acceptance.suite.dist.yml to acceptance.suite.yml
  • Navigate back to the root folder of Joomla
  • Run tests/codeception/vendor/bin/robo run:tests

Expected result

Joomla has System tests

Actual result

Joomla has no System tests

Documentation Changes Required

Yes, parts are already integrated and will be updated the next days.

Thank you to all people working on this topic in the last years!

yvesh and others added 30 commits May 15, 2016 22:00
New integration of Codeception 2.2 dev-master into Joomla
Adds Gherkin Pages and Step Objects as sample of useage
…dSteps2

[tests] new convention for locating elements
Adding testing instructions to readme
Adding users.feature scenarios using gherkin
# Conflicts:
#	RoboFile.php
#	tests/_support/AcceptanceTester.php
#	tests/acceptance.suite.dist.yml
Comment thread tests/codeception/README.md Outdated

2. Install `composer` in your system. Read more about [how to install composer](https://getcomposer.org/doc/00-intro.md) here.

3. Install composer packages using following steps from root directory of this project.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using the following

Comment thread tests/codeception/README.md Outdated
2. Install `composer` in your system. Read more about [how to install composer](https://getcomposer.org/doc/00-intro.md) here.

3. Install composer packages using following steps from root directory of this project.
We are using `composer.json` file for `tests/codeception` folder, so that you will have to run composer install from tests directory.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the tests directory

Comment thread tests/codeception/README.md Outdated
$ tests\codeception\vendor\bin\robo run:test
```

If you want to see steps then you can use `--steps` option of codeception. Check [full codecept command list here](http://codeception.com/docs/reference/Commands#Run)_
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the steps

Comment thread tests/codeception/README.md Outdated
$ cd tests/codeception && composer install
```

4. Copy `tests/codeception/acceptance.suite.dist.yml` to `tests/codeception/acceptance.suite.yml` and change settings according to your webserver.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the settings

Comment thread tests/codeception/README.md Outdated

If you want to see steps then you can use `--steps` option of codeception. 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 the file `tests/codeception/acceptance/_bootstrap.php`
Copy link
Copy Markdown
Contributor

@brianteeman brianteeman Jun 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+Note: You can modify the timeout time by setting the value of the TIMEOUT constant lower for fast machines and higher for slow computers. The constant is located in the file tests/codeception/acceptance/_bootstrap.php

* @package Joomla.Test
* @subpackage AcceptanceTester
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2017

* @subpackage AcceptanceTester
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LICENSE.txt

* @subpackage AcceptanceTester
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the same for all new files

}

/**
* See an entry in the database
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be better as Find in the database and not found in the database?

}

/**
* Edit an user
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit a user

(the rule is that it is an when before a vowel EXCEPT when the vowel is pronounced as a consonant - which it is in this case YOU-SIR

Comment thread tests/codeception/functional.suite.yml Outdated
#
# Suite for functional (integration) tests
# Emulate web requests and make application process them
# Include one of framework modules (Symfony2, Yii2, Laravel5) to use it
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the framework

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was generated by codeception, but i still fixed it for us :) Thank you @brianteeman !!

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Jun 18, 2017

@yvesh did you already run the script for the header that I did not updated yesterday?

@yvesh
Copy link
Copy Markdown
Member Author

yvesh commented Jun 18, 2017

@zero-24 Updated it manually now, because we have too many different subpackage names.

@SniperSister
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on 6ddf0c2


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16743.

@dneukirchen
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully

bildschirmfoto 2017-06-18 um 12 58 57

Comment thread tests/codeception/README.md Outdated
$ tests\codeception\vendor\bin\robo run:test
```

If you want to see the steps then you can use `--steps` option of codeception. Check [full codecept command list here](http://codeception.com/docs/reference/Commands#Run)_
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove trailing _

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.