Everyone has to start somewhere and if you’re new to VIVIDUS, this is where to begin.
In order to use VIVIDUS effectively, you need to know what it is and understand some of its fundamental concepts. So before you start using VIVIDUS in earnest, we highly recommend you read "How to cook VIVIDUS?".
-
Download and install Git client
-
Configure your identity
-
Download and install Java 17.
-
Configure
JAVA_HOME
environment variable to point your directory with installed JDK. -
Add new entry to
PATH
environment variable:-
for Windows:
%JAVA_HOME%/bin
-
for macOS / Linux:
$JAVA_HOME/bin
-
-
Login to GitHub (create a new account at first if you don’t have any).
-
Create test project repository:
get an existing test project from GitHub …
-
Navigate to the target VIVIDUS tests repository page (e.g. vividus-sample-tests)
-
Create a fork of the target tests repository to be able to execute and modify scripts at your convenience:
-
click btn:[Fork] icon at the top-right corner of the screen,
-
the pre-populated values cover the average user needs, so just click btn:[Create fork] button,
-
as the result you now have a copy of the target tests repository at your personal GitHub account.
-
or generate your own empty project based on the starter project.
-
Open generator.
-
Provide repository name for your test project.
-
Choose option to set visibility of your repository:
Public
orPrivate
(Private
is recommended from start, it can be changed in future). -
Click btn:[Create repository from template] button.
-
-
Clone your newly generated repository:
git clone --recursive your_generated_project_url.git
-
Go to the local directory with your cloned repository:
cd your_repository_name
-
Build the project:
-
macOS / Linux:
./gradlew build
-
Windows:
gradlew build
-
Please choose any of the listed below IDEs.
-
Install Eclipse IDE 2023-09
-
Add JBehave plugin
-
Generate Eclipse configuration files:
-
macOS / Linux:
./gradlew eclipse
-
Windows:
gradlew eclipse
-
-
Start creating your tests
-
Install Visual Studio Code.
-
Install VIVIDUS Studio Extension.
-
Open Visual Studio Code.
-
Click menu:File[Open…].
-
Open a folder with a VIVIDUS project.
-
Wait until the message
Project with the name '…' is loaded
appears. -
Start creating your tests.
-
Open Command Palette by clicking menu:View[Command Palette…].
-
Type
VIVIDUS: Run Stories
in the search bar and select matched command. -
Find the tests execution progress logged in the
Output
console (if it’s closed open it by clicking menu:View[Output]).
-
Execute your tests via Gradle:
-
macOS / Linux:
./gradlew runStories
-
Windows:
gradlew runStories
-
At the end of any test run, VIVIDUS will give you a link to where the corresponding test report was published. It should look like this:
2022-05-23 13:38:15,523 [main] INFO org.vividus.report.allure.AllureReportGenerator - Allure report is successfully generated at /dir/to/where/the/results-are-published/.out/vividus-demo/reports/allure/index.html
Modern browsers don’t allow to open the report hosted on the local filesystem due to security restrictions. The following options could be considered.
-
Go into the directory:
cd /dir/to/where/the/results-are-published/.out/vividus-demo/reports/allure
-
Start a webserver of your choice, in the example below we are using a node webserver through port
3456
:✔ ~/dir/to/where/the/results-are-published/.out/vividus-demo/reports/allure $ http-server -p 3456
-
Launch a browser, type
localhost:3456
into the URL. If you followed the instructions properly, you should see your report.
-
Tune CORS option in the browser of your choice.
WarningMake sure this browser will be used to view test reports only, it’s not safe to surf the Internet with relaxed security rules. -
Go to the test report directory and open
index.html
in the configured browser.
-
Open Visual Studio Code
-
Install Live Server extension (to get help on how to install extensions in VSCode please see Install an extension guide)
-
Click
File → Open Folder…
in VSCode menu and choose the following folder:/dir/to/where/the/results-are-published/.out/vividus-demo/reports/allure
-
Open
index.html
file -
Click
Go Live
icon residing on right side of the bottom bar and wait until report is opened
Tip
|
The Live Server extension supports hot reload so you can run the tests and then just refresh report page in the browser to see actual results, however the VSCode session should remain active. |