2017 © Pedro Peláez
 

library accepter

image

dadyday/accepter

  • Saturday, April 21, 2018
  • by dadyday
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 3 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Accepter

This is my little project for easy creating acceptance tests. Actually I'm working on it, so this is'nt really ready for usage yet., (*1)

What it does

It runs your acceptance test script against a webdriver, simulates your defined interactions and checks your expectations. not new so far., (*2)

The difference to all the other acceptance tester is: it helps you interactively to create your test script., (*3)

This looks like this: You create a new test:, (*4)

<?php
use Accepter\Accept as I;

I::open('demo/deepthought.html');

I::record();

See the example in the demo folder., (*5)

Now if you run the accepter, it will open a browser window with a small toolbar., (*6)

Sample recording, (*7)

You can use the toolbar to select the elements on the page and choose what you want to inspect. If you are ready, the accepter will add these actions to your script. e.g:, (*8)

<?php
use Accepter\Accept as I;

I::open('demo/deepthought.html');

//* recorded 2018-04-01 11:00:00
I::focus('#question')
    ->enter('the question');

I::wait('#answers li', 10)
    ->isVisible()
    ->hasText('42')
    ->isBold();
// recorded */

I::record();

Run the script again, and all your actions and assert will be automated done. If somewhat fails, the browser stops and let you inspect what was wrong., (*9)

Nice, huh?, (*10)

How it works

The Tool uses a webdriver like selenium or chromedriver for the automation. On every page which will be loaded, it injects a little javascipt, that helps you to record your interactions. A codegenerator creates out of this data the scriptcode and writes it back into the calling file., (*11)

It shoud be possible, to create various other codegenerators for other acceptance test programs or languages., (*12)

Conclusion

As said, this project is currently in progress, and not everything is working at this time. But if you like what you see, leave me a star, so i will keep coding ... :), (*13)

The Versions

21/04 2018

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires