Apollo Installation Guide

Install Apollo

Apollo uses a client server architecture. Apollo is delivered as a client component and a server component. The server component is implimented as a Microsoft Azure hosted Cloud Function. The client component is delivered as a collection of jars. These jars include the Apollo client system and its associated utility libraries.

Once configured, the client is a replacement for RFT. RFT tests in Eclipse will now run without RFT or an RFT licence. To install the server component an Azure subscription is required. The server component manages the core proprietary functionlity at the heart of the RFT emulation as well as the Azure billing which is based on usage.

Install the Apollo Cloud Function

The Apollo Cloud Functions are obtained from the Microsoft Azure Marketplace and installed under your Azure Subscription.

Apollo on the Azure Marketplace

Read about Apollo and the use of Azure billing to your subscription and then click the "GET IT NOW" button. Complete your details and then proceed to Azure to complete the installation of the Cloud Functions.

Install the Apollo Client

The latest Apollo client is available as a FREE file download (ZIP) from this site. Please read and follow the Apollo Deployment Guide (PDF).

Apollo Client Jars Apollo Deployment Guide

The Apollo client is free to download as all the billing is done through the Azure Cloud Function.

Apollo Demonstration in Eclipse

This demonstration is based on:

It demonstrates a working Apollo project in Eclipse that uses RFT test script syntax. As RFT tests can be quite varied and adopt various conventions and frameworks this demonstration is quite basic. Taking an existing RFT test script and pasting it into a new Eclipse project that follows these simple conventions will demonstrate the power of Apollo as an effective RFT emulation based on Selenium.

Add Apollo Jars

Create a lib folder and import the Apollo jars into the Eclipse project. Add them to the build path.

Add Selenium Jars

Download the Selenium client from Selenium Client & WebDriver Language Bindings e.g. selenium-java-3.141.59.zip from https://www.selenium.dev/downloads/

Expand this zip fie and add these jars to the build path.

Install the chromedriver

Download a version of the chromedriver that is compatible with your version of Chrome from https://chromedriver.chromium.org/

Expand the chromedriver_win32.zip file. A simple way of installing the chromedriver is to copy the chromedriver.exe into the windows System32 folder at C:\Windows\System32.

Change import statements

In your existing RFT test, remove the RFT import statements, and replace them with the Apollo import statements.

Create the JavaScriptSuperClass.java

This java class contains any standard Selenium management methods that you wish to use. In this example we include a simple startBrowser() method. Create it in a test package folder.

package test;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

import au.com.testpro.rft2selenium.JavaSeleniumSuperClass;

public abstract class JavaScriptSuperClass extends JavaSeleniumSuperClass {
	
	public static String homeURL;

	public void startBrowser(String browser, String URL) {

		homeURL = URL;

		if (browser.equalsIgnoreCase("FireFox")) {
			driver = new FirefoxDriver();

		} else if (browser.equalsIgnoreCase("Chrome")) {

			ChromeOptions o = new ChromeOptions();
			o.addArguments("disable-extensions");
			o.addArguments("--start-maximized");
			driver = new ChromeDriver(o);

		} else if (browser.equalsIgnoreCase("Edge")) {
			driver = new EdgeDriver();
		} else { // default
			driver = new InternetExplorerDriver();
		}

		driver.get(URL);

		System.out.println(" use driver in JavaScriptSuperClass");
	}
	
}

SearchGoogle.java example

This is the sample test, create it in the same test package folder as the superclass above.

package test;

import au.com.testpro.rft2selenium.itestdata.ITestDataTable;
import au.com.testpro.rft2selenium.objects.GuiTestObject;
import au.com.testpro.rft2selenium.objects.TestObject;
import au.com.testpro.rft2selenium.objects.TextGuiTestObject;
import au.com.testpro.rft2selenium.objects.TopLevelTestObject;
import au.com.testpro.rft2selenium.objects.SelectGuiSubitemTestObject;
import au.com.testpro.rft2selenium.util.EmulatorLogger;

public class SearchGoogle extends JavaScriptSuperClass {

	public void testMain(Object[] args) throws InterruptedException {
		TestObject[] Objs;
		TextGuiTestObject textObj;

		startBrowser("Chrome", "https:\\google.com");

		// RFT Stuff
		Objs = getRootTestObject().find(atDescendant(".class", "Html.INPUT.text", ".title", "Search"));
		
		textObj = (TextGuiTestObject) Objs[0];
		textObj.click();
		textObj.setText("cat");
		
		Objs = getRootTestObject().find(atDescendant(".class", "Html.INPUT.submit", ".name", "btnK"));
		((GuiTestObject) Objs[0]).click();
						
		Thread.sleep(2000);

		driver.quit();
	}

	public static void main(String[] args) throws InterruptedException {
		SearchGoogle xx = new SearchGoogle();
		xx.testMain(null);
	}

}

Launching Tests

As RFT is not present you may launch your tests via the java command line, JUnit or a simple main() method. In this example we show the use of a simple main() method to demonstrate Apollo.

Review the Apollo_Demo Package

Note that JUnit is not a required component.