IDEA IntelliJ Plugin

IntelliJ IDEA is a Java (IDE) for developing computer software. It is developed by JetBrains, and is available as an Apache 2 Licensed community edition, and in a proprietary commercial edition. Both can be used for commercial development.


Table of Contents

Install

In IntelliJ IDEA, choose File > Settings... > Plugins and write "LivingDoc".

In case appears "No plugins found", you should clic on Search in repositories.


Press Install.


After the installation you must Restart IntelliJ IDEA, for the plugin to be available within the application.

Configure

Following steps are needed to configure the LivingDoc IntelliJ plugin.
Before you begin, you must verify:

Workspace configuration

First, you have to configure where the plugin can find the LivingDoc Server. This is done in File > Settings... > Tools > LivingDoc.



Enter the URL for the server: for Confluence, it is the base URL of Confluence (e.g. http: //domain:8080/confluence). This field is mandatory, in other case Test Connection button will be disabled.

You can test the connection by clicking on the Test Connection button.

After press Test Connection button are three possible results:

  • Connected!

  • Error

  • Failed Connection


Also, you must type your confluence user credentials to execute the livingdocplugin.

Project configuration

Check the project properties (File > Project Structure... > Modules). 


 In the LivingDoc tab, you should enable LivingDoc for module and you will identify your IntelliJ project to a System Under Test (under development). By doing so, you will see all the associated specification repositories.

In addition, you can override the DefaultSystemUnderDevelopment class with your own custom class.

You are now ready to execute specification documents on your development code.

Use

Running specifications

Prepare Confluence Page

 Before using LivingDoc in IntelliJ you have to specify your executable table and implement a suitable fixture. The guide about how to write your executable specification can found here. 

 Please make sure that your modified Confluence page is up-to-date. Click on Set as Implemented as shown below. 


 Now your executable table can found inside your IntelliJ IDEA.

 Now you should see your Java-Modules and the livingdoc-project-name in brackets which you set in your Confluence configuration. If you expand all you should see something like this:


Run Configuration

To validate that your project development code respect the example in the specifications, you create a new Run Configuration. The Debug configuration works the same way. Then create a new LivingDoc Specification

Inputs

  1. Repository UID 
    The remote Repository UID (none if local)
  2. Document Repository base URL 
    The Repository URL (or directory path if local)
  3. Document Repository Class
    • info.novatec.testit.livingdoc.repository.FileSystemRepository for files
    • info.novatec.testit.livingdoc.runner.repository.AtlassianRepository for Confluence
    • info.novatec.testit.livingdoc.runner.repository.VFSRepository for zip ...
  4. Specification 
    The Specification name (document name)
  5. Working Copy (current version) 
    If versioning is handled, aim for the latest version of the document.


Execute Document

Open the Repository View and click right to execute a certain document to run the tests.


Results

Running the specification will give you a result like this one



Notice that the html result file was added to your project files.


Repository View

 You can view all the specifications for your project using the Repository View. 

Show the Repository View tool window

From the IntelliJ standard tool windows selection: View > Tool Windows > Repository View.

 

The Repository View

The Repository view is a JUnit view.
You will be able to launch executions, view documents and results and work on both Implemented and Working copies of the documents.
Careful! The Green bar might be addictive after a while...


Project
 LivingDoc enabled
Repositories
A Remote File Repository
Documents
Executable
Working differs from the Implemented copy
Working copy
Actions
Executes the selected Document
Debug the selected Document
Will tell IntelliJ to work on the Working copy of the Document
Will tell IntelliJ to work on the Implemented copy of the Document
Open the selected Document from the Repository
Refreshes the Tree

By default IntelliJ will work on the Implemented copy of the document.