Wednesday, December 11, 2019

List of some API Testing Tools

Some API Testing Tools:

Free & Paid:

  • SOAPUI
  • Postman
  • Apigee
  • Ping API
  • HttpMaster: There are 2 editions -  Express edition is free & Professional edition is paid
  • SOAP Sonar: There are 2 editions - Free Edition & Enterprise Edition (paid)

Free/Open source:

  • Rest-assured
  • JMeter
  • Karate DSL
  • Airborne
  • Rest Console
  • Hippie-Swagger

Commercial:

  • SOAtest
  • Unified Functional Testing (UFT) [Formerly QTP]
  • Tricentis
  • Pyresttest
  • API Fortress
  • vREST
  • API Science
  • APImetrics

Tuesday, December 10, 2019

Mobile Test Automation Tools/Frameworks

Free / Open source tools:

Supported OS: Android, iOS
Supported Languages: Java, Python, Ruby, PHP, JavaScript

Calabash

Supported OS: Android, iOS
Supported Languages: C#, Ruby, JVM-based languages

Robotium

Supported OS: Android
Supported Languages: Java

TestProject
Supported OS: Android, iOS
Supported Languages: Java, C#

Monkey Talk

Supported OS: Android, iOS

Ui Automator

Supported OS: Android
Supported Languages: Java

Selendroid

Supported OS: Android
Supported Languages: Java, Python

iOS UI Automation

Supported OS: iOS
Supported Languages: JavaScript

Keep It Functional

Supported OS: iOS
Supported Languages: Objective-C and Swift languages

iOS Driver

Supported OS: iOS
Supported Languages: JavaScript

Commercial tools:

Test Complete
Supported OS: Android, iOS
Supported Languages: Python, VBScript, JScript, or JavaScript

Ranorex

Supported OS: Android, iOS
Supported Languages: C#, VB.NET

Wednesday, November 6, 2019

Test Automation for Windows Desktop Application using Winium with Java

Prerequisites to work with Winium:

1. Microsoft .NET Framework
2. Eclipse (as IDE)
3. Java/JDK
4. TestNG
5. Maven
6. Inspection Element tool (such as Inspect.exe)

Step 1: Creating a Maven project

Open Eclipse IDE and create a Maven project. Update the pom.xml with the necessary dependencies. Dependencies to include – Winium WebDriver, Winium Elements Desktop, Selenium Java, TestNG.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>WiniumWithJava</groupId>
  <artifactId>WiniumWithJava</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <dependencies>
  <!-- https://mvnrepository.com/artifact/com.github.2gis.winium/winium-webdriver -->
<dependency>
    <groupId>com.github.2gis.winium</groupId>
    <artifactId>winium-webdriver</artifactId>
    <version>0.1.0-1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.2gis.winium/winium-elements-desktop -->
<dependency>
    <groupId>com.github.2gis.winium</groupId>
    <artifactId>winium-elements-desktop</artifactId>
    <version>0.1.0-1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>3.141.59</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>7.0.0</version>
    <scope>test</scope>
</dependency>
  </dependencies>
</project>

Step 2: Downloading Winium.Desktop.Driver.exe

Download the latest Winium.Desktop.Driver.zip from below link -> extract and keep in any location.
https://github.com/2gis/Winium.Desktop/releases

Step 3: Writing Winium Java code

import java.io.File;
import java.io.IOException;
import org.openqa.selenium.By;
import org.openqa.selenium.winium.DesktopOptions;
import org.openqa.selenium.winium.WiniumDriver;
import org.openqa.selenium.winium.WiniumDriverService;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

public class NotepadExample{
    WiniumDriver driver;
    DesktopOptions option;
    WiniumDriverService service;

@BeforeClass(alwaysRun = true)
public void setUp() throws Exception {
option = new DesktopOptions();
option.setApplicationPath("C:\\Windows\\System32\\notepad.exe");
File driverPath = new File("E:\\QA_720\\Winium\\Winium.Desktop.Driver\\Winium.Desktop.Driver.exe");
service = new WiniumDriverService.Builder().usingDriverExecutable(driverPath).usingPort(9999).withVerbose(true).withSilent(false).buildDesktopService();
try{
service.start();
}catch(IOException ioe){
System.out.println("Exception while starting WINIUM service");
ioe.printStackTrace();
}
driver = new WiniumDriver(service, option);
}
@AfterClass(alwaysRun = true)
public void tearDown() throws Exception {
service.stop();
}

@Test
public void testNotepad() throws Exception{
Thread.sleep(1000);
driver.findElement(By.name("Text Editor")).sendKeys("This is sample Winium test");
driver.findElement(By.id("Close")).click();
driver.findElement(By.name("Don't Save")).click();
}
}

Step 4: Running the test using TestNG

In Eclipse project, right click on the class "NotepadExample.java" -> Mouse over Run As -> Click TestNG Test

Enjoy test execution of Notepad. The following steps would do by running this:
1. Open Notepad
2. Writing some text on Notepad
3. Close the Notepad without saving it