<commit_before>passbolt selenium testsuite
===========================================

This project is the functional testsuite of Passbolt. It is based on Selenium, PhpUnit and Facebook php-webdriver

Checkout [passbolt.com](http://www.passbolt.com) for more information


## License
GPL v3 License, see [License](license.md). Unless mentioned otherwise in the individual source files.


## About Facebook php-webdriver

This WebDriver client is a driver developped by Facebook. It aims to be as close as possible to bindings in other languages.
The concepts are very similar to the Java, .NET, Python and Ruby bindings for WebDriver.

Looking for documentation about php-webdriver? See the official [repository](http://facebook.github.io/php-webdriver/)

##  More information

Check out the Selenium [docs and wiki](http://docs.seleniumhq.org/docs/ and https://code.google.com/p/selenium/wiki)

Learn how to integrate it with PHPUnit [Blogpost](http://codeception.com/11-12-2013/working-with-phpunit-and-selenium-webdriver.html) | [Demo Project](https://github.com/DavertMik/php-webdriver-demo)


How to get started
===========================================

##  GET THE CODE

### Github

    git clone <EMAIL>@github.<EMAIL>:passbolt/passbolt_selenium.git

### Bitbucket

    git clone git@bitbucket.org:passbolt/passbolt_selenium.git

##  CONFIG

Clone or rename config.php.default to

##  SELENIUM

*   Download the selenium-server-standalone-#.jar file provided here:

				http://selenium-release.storage.googleapis.com/index.html

*   Download and run that file, replacing # with the current server version.

        java -jar selenium-server-standalone-#.jar

*   You can also run it on a remote host, you will need to set it up as a grid/node by running two instances

        java -jar selenium-server-standalone-#.jar -role hub
        java -jar selenium-server-standalone-#.jar -role node

*   Then when you create a session, be sure to pass the url to where your server is running.

        // This would be the url of the host running the server-standalone.jar
        $host = 'http://localhost:4444/wd/hub'; // this is the default

*   Make sure you have firefox installed on your selenium host!


## PHPUNIT (Using brew or similar)

*  Get phpunit using your package manager for example

    brew phpunit

*   To run unit tests then simply run:

    phpunit -c ./tests/USERROLE

    where User role is
    - AN : user without plugin
    - AP : user with plugin
    - LU : user with configured plugin and user account

* You can also run all tests

    $ ./run_all_test.sh

## PHPUNIT (Using composer)

*   If you don't want to use your local package manager (brew, apt-get, etc.) you can download the composer.phar

    curl -sS https://getcomposer.org/installer | php

*   Install the library.

    php composer.phar install

*   To run unit tests then simply run:

    ./vendor/bin/phpunit -c ./tests


## PASSBOLT Plugin

*   Get the plugin by downloading the latest build from the repository and put it in data/extensions

    https://github.com/passbolt/passbolt_ff/blob/develop/passbolt-firefox-addon.xpi?raw=true

*   Or if you are developing you can create a simlink to your addon project

		cd data/extensions
		ln -s ../../../passbolt_ff/passbolt-firefox-addon.xpi .

## PASSBOLT Fixtures

*   Place the GPG keys in data/fixtures/gpg from

https://github.com/passbolt/passbolt/tree/develop/app/Config/gpg

*   Or if you are developing you can create a simlink to your passbolt project

    cd data/fixtures
    ln -s ../../../passbolt/app/Config/gpg/ .<commit_msg>Fixing readme<commit_after>passbolt selenium testsuite
===========================================

This project is the functional testsuite of Passbolt. It is based on Selenium, PhpUnit and Facebook php-webdriver

Checkout [passbolt.com](http://www.passbolt.com) for more information


## License and copyright
Unless it is mentioned otherwise in the individual source files the code is copyright 2015-onward Passbolt.com
and distrubed under GPL v3 License, see [License](license.md)


How to get started
===========================================

##  GET THE CODE

### Github

    git clone <EMAIL>:passbolt/passbolt_selenium.git

### Bitbucket

    git clone <EMAIL>:passbolt/passbolt_selenium.git

##  CONFIG

Clone or rename config.php.default to

##  SELENIUM

*   Download the selenium-server-standalone-#.jar file provided here:

    http://selenium-release.storage.googleapis.com/index.html

*   Download and run that file, replacing # with the current server version.

    java -jar selenium-server-standalone-#.jar

*   You can also run it on a remote host, you will need to set it up as a grid/node by running two instances

    java -jar selenium-server-standalone-#.jar -role hub
    java -jar selenium-server-standalone-#.jar -role node

*   Then when you create a session, be sure to pass the url to where your server is running.

    // This would be the url of the host running the server-standalone.jar
    $host = 'http://localhost:4444/wd/hub'; // this is the default

*   Make sure you have firefox installed on your selenium host!


## PHPUNIT (Using brew or similar)

*  Get phpunit using your package manager for example

    brew phpunit

*   To run unit tests then simply run:

    phpunit -c ./tests/USERROLE

    where User role is
    - AN : user without plugin
    - AP : user with plugin
    - LU : user with configured plugin and user account

* You can also run all tests

    $ ./run_all_test.sh

* You can also run the tests matching a given pattern (matching class or function name), for example:

    $ phpunit -c ./tests/LU --filter PasswordDeleteTest


## PHPUNIT (Using composer)

*   If you don't want to use your local package manager (brew, apt-get, etc.) you can download the composer.phar

    curl -sS https://getcomposer.org/installer | php

*   Install the library.

    php composer.phar install

*   To run unit tests then simply run:

    ./vendor/bin/phpunit -c ./tests


## PASSBOLT Plugin

*   Get the plugin by downloading the latest build from the repository and put it in data/extensions

    https://github.com/passbolt/passbolt_ff/blob/develop/passbolt-firefox-addon.xpi?raw=true

*   Or if you are developing you can create a simlink to your addon project

		cd data/extensions
		ln -s ../../../passbolt_ff/passbolt-firefox-addon.xpi .

## PASSBOLT Fixtures

*   Place the GPG keys in data/fixtures/gpg from

https://github.com/passbolt/passbolt/tree/develop/app/Config/gpg

*   Or if you are developing you can create a simlink to your passbolt project

    cd data/fixtures
    ln -s ../../../passbolt/app/Config/gpg/ .


About Facebook php-webdriver
===========================================

This WebDriver client is a driver developped by Facebook. It aims to be as close as possible to bindings in other languages.
The concepts are very similar to the Java, .NET, Python and Ruby bindings for WebDriver.

Looking for documentation about php-webdriver?
- [API](http://facebook.github.io/php-webdriver/)
- [Repository](https://github.com/facebook/php-webdriver)


##  More information

Check out the Selenium [docs and wiki](http://docs.seleniumhq.org/docs/ and https://code.google.com/p/selenium/wiki)

Learn how to integrate it with PHPUnit [Blogpost](http://codeception.com/11-12-2013/working-with-phpunit-and-selenium-webdriver.html) | [Demo Project](https://github.com/DavertMik/php-webdriver-demo)
{'fraction_non_alphanumeric': 0.11600803750837241, 'fraction_numerical': 0.004018754186202277, 'mean_word_length': 3.457313432835821, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 11, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1104024', 'n_tokens_mistral': 2346, 'n_tokens_neox': 2129, 'n_words': 814}