A library for defining manual actions and validations. Useful for generating manual test books, but can also be used as a placeholder actuation layer before another automation layer is implemented.
This library supports actions, validations, and notes. There is also support for generating test books steps (for HTML and Excel formats), and common event sets.
Tip
|
To see an example of this library in action, look at the wind-bobbin-up directory, which contains a Provengo project with manual instructions for a famous nursery rhyme. The resulting test book is here. |
INFO: For changelog, see bottom of this file.
To install, place the library’s source file in the lib
folder of your project. The library is available at the release page.
On Unix machines, download directly from this site, write the following snippet at your project’s root directory:
curl https://api.github.com/repos/provengo/lib-manual/releases/latest \
| grep browser_download_url \
| cut -d\" -f4 \
| xargs curl -L > lib/ManualLib.js
Creates a new manual session object, with the given name. See session object reference below.
An event set that contains all events from this library, from all sessions. For example, to wait for any of the Manual library events, use waitFor(Manual.any)
.
Adds a test book step for Manual library events, and ignores other events. Returns true
if a manual step was added to the current book.
Parameters:
event
-
The event that may or may not be a Manual library event.
format
-
Optional. Either "html" (default), or "qc-xls". The former generates a step with richer markup, whereas the latter creates a plain-text step description.
Returns: true
if a step was added to the test book, and false
otherwise.
A UserSession
object describes a single user session during a manual test. To create a new object of this type, call Manual.defineUser(name)
and pass the user session name (e.g. "customer", "admin").
Note
|
This library defines three step types: The request(session.actionEvent("do something")); // explicit form
session.doAct("do something"); // convenience shorthand |
Request a session.actionEvent(action, details, validation)
. See below.
An event telling the tester to take some action, for example to click a button or type some text. Can optionally contain details and validation.
Parameters:
action
-
String. The action that the tester should perform.
details
-
Optional, String. Any further details about
action
the tester needs to know. validation
-
Optional, String. A validation step that needs to be done immediately after performing
action
.
An event informing the tester of something important, often some context about the action or some non-actionable information.
Parameters:
text
-
String. Main note text.
details
-
Optional, String. Additional details for the note.
Request a session.validateEvent(condition, details)
. See below.
An event instructing the tester to validate a condition. Normally used to validate a condition that depends on multiple actions that precede the validation. In these cases, we’ll see a series of actionEvent
s, followed by one or more validationEvent
s.
Parameters:
condition
-
String. The condition that should be validated.
details
-
Optional, String. Additional validation details, if needed.
Enjoy, and we hope you find it useful! Feel free to fork, improve, and share your version of this library!
— Provengo Engineering