Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rsheremeta/allure-environment-creator
This tiny Library helps you to serve and store environment data for Allure easily.
https://github.com/rsheremeta/allure-environment-creator
allure allure-framework allure-java allure-report allure-reports allure2 java selenium testing testing-framework
Last synced: 1 day ago
JSON representation
This tiny Library helps you to serve and store environment data for Allure easily.
- Host: GitHub
- URL: https://github.com/rsheremeta/allure-environment-creator
- Owner: RSheremeta
- Created: 2020-12-30T17:45:08.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-13T11:40:44.000Z (almost 4 years ago)
- Last Synced: 2024-11-11T11:48:15.772Z (2 months ago)
- Topics: allure, allure-framework, allure-java, allure-report, allure-reports, allure2, java, selenium, testing, testing-framework
- Language: Java
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Allure-Environment-Creator
This tiny Library helps you to serve and store environment data for Allure easily.## Installation
1 Since it's not pushed to the MVN central repository yet, there are two installation options:* Download already compiled and packaged **Allure-Environment-Creator-1.0.jar** file [HERE][here] and proceed to the 2nd step
* Download source code [HERE][here] to your local machine, make a jar by running **`mvn package`** in the repo directory and proceed to the 2nd step2 Put a **Allure-Environment-Creator-1.0.jar** file into your project directory (for instance – create root dir `~/libs/` and paste there)
3 Add this dependency to your `pom.xml` (**systemPath** value is for instance)
````
com.github.rsheremeta
Allure-Environment-Creator
1.0
system
${basedir}/libs/Allure-Environment-Creator-1.0.jar
````## Usage
1. In your ``@BeforeSuite`` or ``@AfterSuite`` method (or ``@BeforeClass`` or ``@AfterClass`` for **JUnit**):
````
@BeforeSuite(alwaysRun = true)
public void beforeSuiteSetUp() {
// Instantiate a map with your needed Environment values
Map envData = new HashMap<>();
envData.put("Base URL", "https://google.com/");
envData.put("User", "Admin");
envData.put("OS", System.getProperty("os.name"));
/*
If your /allure-results is in /target – just pass instantiated map as a parameter
*/
AllureEnv.createAllureEnvironmentFile(envData);
/*
If your /allure-results is in custom directory – just pass one more parameter
with customPath to your /allure-results directory
*/
AllureEnv.createAllureEnvironmentFile(envData, "/custom/path/to/allure-results/");
// some your other code
}
````2. Now you're all set to run your suite.
3. Once suite is finished, generate allure report and take a look on the **Environment** section:
![Allure Report Results](https://i.ibb.co/RbstTc3/Allure-Environment-Creator.png)
[here]: https://github.com/RSheremeta/Allure-Environment-Creator/releases