[INIT] Initial version

* Minimal setup to get anyone started
* Full documentation to get started inside readme
* Very basic example to test whether everything works
This commit is contained in:
Daniel Siepmann 2015-11-14 21:07:10 +01:00
commit c1d23137e0
7 changed files with 1461 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/vendor/
/bin/

7
behat.yml Normal file
View file

@ -0,0 +1,7 @@
default:
extensions:
Behat\MinkExtension\Extension:
base_url: http://web-vision.de
goutte: ~
selenium2: ~
# default_session: selenium2

13
composer.json Normal file
View file

@ -0,0 +1,13 @@
{
"require": {
"behat/behat": "2.4.*@stable",
"behat/mink": "*",
"behat/mink-extension": "*",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium2-driver": "*"
},
"minimum-stability": "stable",
"config": {
"bin-dir": "bin/"
}
}

1358
composer.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
Feature: Blog is available
To provide useful information
For technical enthusiasts
I want my Blog to be available
Scenario: Website is delivered
Given I am on "http://daniel-siepmann.de"
Then the response status code should be 200
Scenario: Website delivers Blog posts
Given I am on "http://daniel-siepmann.de"
Then I should see 10 ".post-list h2" elements

View file

@ -0,0 +1,17 @@
Feature: Blog delivers content
To provide useful information
For technical enthusiasts
I want my Blog to deliver certain information
Scenario: My name
Given I am on "http://daniel-siepmann.de"
Then I should see "Daniel Siepmann"
Scenario: Link to Github profile
Given I am on "http://daniel-siepmann.de"
Then I should see "DanielSiepmann" in the ".github a" element
Scenario: Certified integrator batch
Given I am on "http://daniel-siepmann.de"
Then I should see an "img[alt='TYPO3 Certified Integrator Batch']" element

52
readme.md Normal file
View file

@ -0,0 +1,52 @@
This repository will provide all you need to get you up and running with Behat
and mink in a basic setup.
# Install
Run `composer install` from within the repository.
You can verify with `bin/behat -di` whether Behat works and the language is
available to write website tests.
## For non headless browser
Headless means without a GUI, just CLI. This is default for this setup. So all
your tests are run without a GUI of an actual browser.
To use a real browser like Firefox, you need to install selenium standalone
server, in addition, by downloading from http://www.seleniumhq.org/download/
# Execute
Per default you just can run your tests. Therefor execute: `bin/behat features`.
If you wanna see your tests running in real time inside the browser, or need a
specific feature, you need to start the selenium server before running the
tests.
Start selenium server: `java -jar bin/selenium-server-standalone-2.48.2.jar`.
Modify the call to match path and filename of downloaded server.
Uncomment the line containing `default_session` in `behat.yml`, then run your
tests again.
# Extending
Once the tests work you are set to start your own. Just follow the [official
documentation](http://behat.org) and write your own tests.
# Support
Native support is given for Firefox. This repository aims to provide basic
support to get you started. For full support contact us or dive deeper on your
own.
# Further resources
- http://docs.behat.org/en/v2.5/
- http://mink.behat.org/en/latest/index.html
- http://blog.lepine.pro/images/2012-03-behat-cheat-sheet-en.pdf
## For further features
- PHPStorm plugin for Behat: http://projectspace.pl/plugins/behat/screenshots/
- Diff Screenshots from Testsessions: https://github.com/jadu/BehatPerceptualDiffExtension
- Web GUI for all your features: https://github.com/Halleck45/BDDWizard