autospawn

A simple TestNG listener for browser lifecycle management

License

License

Categories

Categories

Auto Application Layer Libs Code Generators
GroupId

GroupId

com.rationaleemotions
ArtifactId

ArtifactId

autospawn
Last Version

Last Version

1.2.2
Release Date

Release Date

Type

Type

jar
Description

Description

autospawn
A simple TestNG listener for browser lifecycle management
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/RationaleEmotions/autospawn

Download autospawn

How to add to project

<!-- https://jarcasting.com/artifacts/com.rationaleemotions/autospawn/ -->
<dependency>
    <groupId>com.rationaleemotions</groupId>
    <artifactId>autospawn</artifactId>
    <version>1.2.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.rationaleemotions/autospawn/
implementation 'com.rationaleemotions:autospawn:1.2.2'
// https://jarcasting.com/artifacts/com.rationaleemotions/autospawn/
implementation ("com.rationaleemotions:autospawn:1.2.2")
'com.rationaleemotions:autospawn:jar:1.2.2'
<dependency org="com.rationaleemotions" name="autospawn" rev="1.2.2">
  <artifact name="autospawn" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.rationaleemotions', module='autospawn', version='1.2.2')
)
libraryDependencies += "com.rationaleemotions" % "autospawn" % "1.2.2"
[com.rationaleemotions/autospawn "1.2.2"]

Dependencies

compile (3)

Group / Artifact Type Version
info.cukes : cucumber-java jar 1.2.5
org.testng : testng jar 7.3.0
org.seleniumhq.selenium : selenium-java jar 3.14.0

Project Modules

There are no modules declared in this project.

Auto-Spawn

This library helps with managing browser instantiation and clean-up automatically for :

  1. Cucumber based tests.
  2. TestNG based tests.

Pre-requisites

  • Cucumber ( Compatibility testing has only been done for group: 'info.cukes', name: 'cucumber-java', version: '1.2.5')
  • JDK-8 ( This implementation uses a reflection based mechanism to alter annotations values at runtime. This has been tested only on JDK8)
  • Cucumber TestNG integration (This implementation does not work with the JUnit based Cucumber runner)

Maven dependency

Add the below maven dependency to get started

<dependency>
  <groupId>com.rationaleemotions</groupId>
  <artifactId>autospawn</artifactId>
  <version>1.2.2</version>
</dependency>

How to use (Cucumber)

  1. Create an implementation of com.rationaleemotions.web.IBrowserCreator.
  2. Wire in this implementation via the JVM argument -Dcreator=
  3. Annotate all cucumber scenarios that automatically need a browser instance to be created using the tag @Browser
  4. Now within your scenario you can query the browser instance using DriverFactory.getDriver()

How to use (TestNG)

  1. Create an implementation of com.rationaleemotions.web.IBrowserCreator.
  2. Wire in this implementation via the JVM argument -Dcreator=
  3. Annotate all @Test methods that automatically need a browser instance to be created using the annotation @Browser
  4. Now within your @Test method you can query the browser instance using DriverFactory.getDriver()

Note:

Here DriverFactory belongs to the package com.rationaleemotions.web.DriverFactory

com.rationaleemotions

Rationale Emotions

This organization houses all the projects that are being built by @krmahadevan

Versions

Version
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0