- Created by Seibert Media employee, last modified on Feb 19, 2018
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
- Atlassian Plugin SDK and basic knowlegde about how to write a Confluence app: Set up the Atlassian Plugin SDK and build a project
- Node and npm: Installing Node.js via package manager
- Optional: basic knowlegde about
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:
- Part 1: First Steps
- Part 2: Infrastructure
- Part 3: Common Spec Files
- Part 4: Test Files
- Part 5: Page Objects
- Part 6: Implementing in TypeScript
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
This content was last updated on 02/19/2018.
This content hasn't been updated in a while. That doesn't have to be a problem. Some of our pages live for years without becoming obsolete. Please click this link if you want us to update this page. Old content can be incorrect, misleading or outdated. Please get in contact with us via a form on this page, our live chat or via email with content@seibert.group if you are in doubt, have a question, suggestion, or want changes from us.