Skip to content

jzeisweiss/selenium-maven-allure-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

selenium-maven-allure-example

ReviewNinja Build Status Build Status

Table of Contents

  1. Report Preview
  2. Code Samples
  3. System Requirements
  4. Eclipse Setup
  5. Run The Demo Example
  6. Library References

Report Preview

Allure Report Demo

Report screenshot


Code Samples

@Features("Jimmy's feature")
public class ExampleTest {
	@Stories("Jimmy's full example")
	@Test(description = "Combine all examples.")
	public void testFullExample() {
		new CoreWebDiver().addStep("Produce amazing things")
		                  .recordScreenshot("During Test example.")
		                  .recordDataFile("During test data file", "{ More Data }");
	}
}

Full code sample.


System Requirements

  1. Java 8
    • This could technically be down graded to Java 7 but would require some adjustments
  2. Maven

Eclipse Setup

  1. Import as an existing Maven project.
  2. Install the TestNG Plugin.
  3. Optional: If you want to run tests from within Eclipse and want the annotation features to work then you need to add a java agent for AspectJ Weaver to your JVM so that it can watch for the annotations.
    1. Go to Eclipse's Preferences
    2. Expand the Java section
    3. Click Installed JREs
    4. Click on the version of Java 8 that you are using
    5. Click Edit
    6. Add -javaagent:allure-tools/aspectjweaver-1.8.3.jar to your Default JVM arguments
    7. Click Finish
    8. Click Apply

Run The Demo Example

  • From command line: $ mvn clean test
  • From Eclipse:
    1. Navigate to the test file ExampleTest.java
    2. Right click on the file
    3. Click Run As
    4. Click TestNG Test

Library References

Library About
Selenium UI Browser Automation
Allure Fancy Test Result Reports
TestNG Test Suite Management

About

Basic framework for a selenium-maven-allure combination.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published