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
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
- 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
Checkout the project on github
Build the project and see if the requirements are met
Open a console and switch to the project directory and start a webdriver.
Open a second Tab in the same folder and start the tests
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
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:
- No labels