forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request joomla#48 from pritalpatel/update-readme
Adding project information in README.md
- Loading branch information
Showing
1 changed file
with
88 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,156 +1,128 @@ | ||
Joomla! CMS™ [](https://github.com/igrigorik/ga-beacon) | ||
==================== | ||
[Browser Automated Tests for Joomla! CMS(covering Users and Content features - GSoC1 16)](https://summerofcode.withgoogle.com/projects/#5724182314745856) | ||
=== | ||
|
||
Build Status | ||
--------------------- | ||
Travis-CI: [](https://travis-ci.org/joomla/joomla-cms) | ||
Jenkins: [](http://build.joomla.org/job/cms/) | ||
|
||
What is this? | ||
--------------------- | ||
* This is a Joomla! 3.x installation/upgrade package. | ||
* Joomla's [Official website](https://www.joomla.org). | ||
* Joomla! 3.6 [version history](https://docs.joomla.org/Joomla_3.6_version_history). | ||
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/master). | ||
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. | ||
|
||
What is Joomla? | ||
--------------------- | ||
* Joomla is a **Content Management System** (CMS) which enables you to build websites and powerful online applications. | ||
* It is a simple and powerful web server application which requires a server with PHP and either MySQL, PostgreSQL or SQL Server to run. You can find more [details here](https://www.joomla.org/about-joomla.html). | ||
* Joomla is **free and OpenSource software** distributed under the GNU General Public License version 2 or later. | ||
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. | ||
|
||
Is Joomla! for you? | ||
--------------------- | ||
* Joomla is [the right solution for most content web projects](https://docs.joomla.org/Joomla_Is_it_for_me%3F). | ||
* View Joomla's core [features here](https://www.joomla.org/core-features.html). | ||
* Try it out for yourself in our [online demo](https://demo.joomla.org). | ||
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. | ||
|
||
How to find a Joomla! translation? | ||
--------------------- | ||
* Repository of [accredited language packs](http://community.joomla.org/translations.html). | ||
* You can also add languages directly to your website via your Joomla! administration panel. | ||
BDD Testing with Gherkin and Codeception | ||
--- | ||
|
||
Learn Joomla! | ||
--------------------- | ||
* Read ['Getting Started with Joomla!'](https://docs.joomla.org/J3.x:Getting_Started_with_Joomla!) to learn the basics. | ||
* Before installing, read the ['Beginners' Guide'](https://docs.joomla.org/Beginners). | ||
### What is Gherkin – BDD Language? | ||
|
||
What are the benefits of Joomla? | ||
--------------------- | ||
* The functionality of a Joomla website can be extended by installing extensions that you can create (or download) to suit your needs. | ||
* There are many ready-made extensions that you can download and install. | ||
* Check out the [Joomla! Extensions Directory (JED)](http://extensions.joomla.org). | ||
* Gherkin is a **human-readable** language for system behaviour description. | ||
* Gherkin is a _natural_ language for testing that **Codeception** uses to define test cases. | ||
* The test is written in plain `English` which is common to all the domains of project team. | ||
* Test cases were designed to be **non-technical** and **human readable**, and **collectively describes**. | ||
* This test is structured that makes it capable of being read in an automated way. | ||
* Gherkin file have a `.feature` extention. | ||
|
||
Is it easy to change the layout display? | ||
--------------------- | ||
* The layout is controlled by templates that you can edit. | ||
* There are a lot of ready-made professional templates that you can download. | ||
* Template management information is [available here](https://docs.joomla.org/Portal:Administrators#Template_Management). | ||
### Benefits of Gherkin? | ||
|
||
Ready to install Joomla? | ||
--------------------- | ||
* Check the [minimum requirements](https://www.joomla.org/about-joomla/technical-requirements.html). | ||
* How do you [install Joomla](https://docs.joomla.org/Installing_Joomla!)? | ||
* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Installing_Joomla_locally). | ||
When ready, it can be moved to an on-line hosting account of your choice. | ||
* It reduces time of answering questions about the logic of the application to **developers**, **designers**, **testers**. | ||
* It can be used as documentation and updated easily. | ||
* It helps quickly understand the logic of the application. | ||
* Features are the basis for writing acceptance tests with test-driven development (TDD and BDD). | ||
* It serves as the basis for writing test cases and test scenarios. | ||
|
||
Updates are free! | ||
--------------------- | ||
* Always use the [latest version](https://www.joomla.org/download.html). | ||
### Main Keywords In Gherkin | ||
|
||
Where can you get support and help? | ||
--------------------- | ||
* [The Joomla! Documentation](https://docs.joomla.org/Main_Page); | ||
* [Frequently Asked Questions](https://docs.joomla.org/Category:FAQ) (FAQ); | ||
* Find the [information you need](https://docs.joomla.org/Start_here); | ||
* Find [help and other users](https://www.joomla.org/about-joomla/create-and-share.html); | ||
* Post questions at [our forums](http://forum.joomla.org); | ||
* [Joomla Resources Directory](http://resources.joomla.org/) (JRD). | ||
|
||
Do you already have a Joomla site that isn't built with Joomla 3.x? | ||
--------------------- | ||
* What's [new in Joomla! 3.x](https://www.joomla.org/3)? | ||
* What are the [main differences between 2.5 and 3.x](https://docs.joomla.org/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F)? | ||
* How to [migrate from 2.5.x to 3.x](https://docs.joomla.org/Joomla_2.5_to_3.x_Step_by_Step_Migration). | ||
* How to [migrate from 1.5.x to 3.x](https://docs.joomla.org/Joomla_1.5_to_3.x_Step_by_Step_Migration). | ||
* How to [convert an existing website to Joomla](https://docs.joomla.org/How_to_Convert_an_existing_Web_site_to_a_Joomla!_Web_site). | ||
|
||
Do you want to improve Joomla? | ||
-------------------- | ||
* How do you [request a feature](https://docs.joomla.org/How_do_you_request_a_feature%3F)? | ||
* How do you [report a bug](https://docs.joomla.org/Filing_bugs_and_issues)? | ||
* Get Involved: Joomla! is community developed software. [Join the community](https://volunteers.joomla.org/). | ||
* Documentation for [Developers](https://docs.joomla.org/Developers). | ||
* Documentation for [Web designers](https://docs.joomla.org/Web_designers). | ||
* Feature | ||
* Scenario | ||
* Given, When, Then, And, But (Steps) | ||
* Background | ||
* Scenario outline | ||
* Examples | ||
|
||
Copyright | ||
--------------------- | ||
* Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. | ||
* [Special Thanks](https://docs.joomla.org/Joomla!_Credits_and_Thanks) | ||
* Distributed under the GNU General Public License version 2 or later | ||
* See [License details](https://docs.joomla.org/Joomla_Licenses) | ||
### Example | ||
File `content.feature` contains, | ||
|
||
## Run the tests | ||
```gherkin | ||
Feature: content | ||
In order to manage content article in the web | ||
As an owner | ||
I need to create modify trash publish and Unpublish content article | ||
To run the tests please execute the following commands (for the moment only working in Linux and MacOS, for more information see: https://docs.joomla.org/Testing_Joomla_Extensions_with_Codeception): | ||
Background: | ||
Given Joomla CMS is installed | ||
When Login into Joomla administrator with username "admin" and password "admin" | ||
Then I see administrator dashboard | ||
```bash | ||
$ cd tests | ||
$ composer install | ||
$ cd .. | ||
$ tests/vendor/bin/robo | ||
$ tests/vendor/bin/robo run:tests | ||
Scenario: Create an Article | ||
Given There is a add content link | ||
When I create new content with field title as "My_Article" and content as a "This is my first article" | ||
And I save an article | ||
Then I should see the "Article successfully saved." message | ||
``` | ||
|
||
## Additional options | ||
### Installation | ||
|
||
You can run the tests against different resolutions. The default acceptance YAML configuration file provides three options: | ||
1. Clone this repository using command below or download source from [here](https://github.com/joomla-projects/gsoc16_browser-automated-tests/archive/staging.zip) | ||
|
||
* "desktop": default, 1024x768px | ||
* "tablet": tablet in portrait mode, 768x1024px | ||
* "phone": phone in portrait mode, 480x640px | ||
```bash | ||
$ git clone [email protected]:joomla-projects/gsoc16_browser-automated-tests.git | ||
``` | ||
|
||
To set a specific resolution, set is as an option of the command: | ||
2. Install `composer` in your system. Read more about [how to install composer](https://getcomposer.org/doc/00-intro.md) here. | ||
|
||
`$ vendor/bin/robo run:tests --env=tablet` | ||
3. Install composer packages using following steps from root directory of this project. | ||
_We are using `composer.json` file for `tests` folder, so that you will have to run composer install from tests directory._ | ||
|
||
Note: the first parameter is used by Travis and you should always set it to "0" when you run your tests locally. | ||
```bash | ||
$ cd tests && composer install | ||
``` | ||
|
||
##For Windows: | ||
4. Copy `tests/acceptance.suite.dist.yml` to `tests/acceptance.suite.yml` and change settings according to your webserver. | ||
|
||
You need to install: | ||
- Git for windows (https://msysgit.github.io/) | ||
- GitHub for windows (https://windows.github.com/) | ||
- Curl for Windows if necesssary. | ||
``` | ||
$ cp acceptance.suite.dist.yml acceptance.suite.yml | ||
``` | ||
|
||
Note: For commands line is better if you use the 'Git shell' program. | ||
5. Get back to project root direcoty using `$ cd ..` | ||
|
||
First you should create a fork of the official repository and clone the fork into your web server folder. | ||
### Run tests | ||
|
||
To prepare the system tests (Selenium) to be run in your local machine you are asked to rename the file `tests/acceptance.suite.dist.yml` to `tests/acceptance.suite.yml`. Afterwards, please edit the file according to your system needs. | ||
To run the tests please execute the following commands. We are usin [Robo.li](http://robo.li/) to execute the tests. | ||
|
||
Open the console and go in the root folder, for example: | ||
#### To execute all the test features you should use. | ||
|
||
```bash | ||
cd C:\wamp\www\gsoc16_browser-automated-tests | ||
$ tests/vendor/bin/robo run:tests | ||
``` | ||
|
||
Then run the commands: | ||
#### You can individual run `feature` using following command. | ||
|
||
To run `content` feature use, | ||
|
||
```bash | ||
$ cd tests | ||
$ composer install | ||
$ cd .. | ||
$ tests/vendor/bin/codecept run tests/acceptance/content.feature | ||
``` | ||
|
||
You can then run the following command to start the tests: | ||
To run `users` feature use, | ||
|
||
```bash | ||
$ tests/vendor/bin/robo run:tests | ||
$ tests/vendor/bin/codecept run tests/acceptance/users.feature | ||
``` | ||
|
||
Once all tests were executed, you may also run a specific test: | ||
_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)_ | ||
|
||
```bash | ||
$ tests/vendor/bin/robo run:test // Then select the test you want to run! | ||
``` | ||
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. | ||
|
||
Mentors | ||
--- | ||
+ Javier Gomez | ||
+ Yves Hoppe | ||
+ Niels Braczek | ||
|
||
Copyright | ||
--------------------- | ||
* Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. | ||
* [Special Thanks](https://docs.joomla.org/Joomla!_Credits_and_Thanks) | ||
* Distributed under the GNU General Public License version 2 or later | ||
* See [License details](https://docs.joomla.org/Joomla_Licenses) |