Page tree
Skip to end of metadata
Go to start of metadata

Random Page

Find pages you are not looking for

Child pages

Table of contents


This Tutorial describes a way to include UI tests with the Protractor into a Confluence app. The resource can be found here: https://github.com/seibert-media/random-page

It uses the Confluence Protractor Base (CPB) which provides function for basic Confluence actions and can be found on github and npmjs.

If you wonder why UI tests are worth the effort, you may want to read our blog article about this topic: UI tests – The solution to all problems

Requirements

Local Confluence instance

You may start a Confluence instance the way you want, but there are some things that are requried for the UI Tests to run run by default.

The easy way to achieve this, is to start an instance with the Confluence plugin SDK

>> atlas-run-standalone --product confluence

Resources

Checkout the project on github

>> git clone https://github.com/seibert-media/random-page
>> cd random-page

Build the project and see if the requirements are met

>> atlas-package
>> npm install

Run tests

Open a console and switch to the project directory and start a webdriver.

>> cd random-page
>> npm run webdriver-update
...
>> npm run webdriver-start

 Open a second Tab in the same folder and start the tests

>> npm run test-e2e

Tutorial

There are some hurdles when starting with UI Tests, but we tried to explain how to do it in a step-by-step tutorial:

Take away

As you've seen there are some thing to do for adding UI tests to a Confluence app. But after the first hurdles and with help of the CPB, it is a nice way to test your plugin as if a user would click through it.

If you have any questions or problems, feel free to contact us via github: 

Happy testing!













  • No labels