Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Other automation tools: SoapUI, Tosca and Appium

Concise study notes on three automation tools—SoapUI (API testing), Tricentis Tosca (model-based functional test automation) and Appium (mobile UI automation)—with key concepts, remembered syntax, worked examples, common mistakes and exam guidance.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

API, GUI and mobile features are often critical parts of modern software. SoapUI, Tosca and Appium are automation tools used by engineers to automate API tests, model-based functional tests and mobile UI tests respectively; using them reduces manual effort, improves repeatability and integrates into CI/CD pipelines.

Key ideas

Start from first principles: software testing verifies software behaviour against requirements. When tests must be repeated, automated tools increase speed and reduce human error.

  • API testing: testing the interfaces (APIs) that applications expose. An API (Application Programming Interface) is a documented set of endpoints and message formats through which one program invokes another. Assumption: the API contract (formats, endpoints, authentication) is specified.

  • SOAP and REST: two common API styles. SOAP (Simple Object Access Protocol) is a protocol that uses XML envelopes and usually a WSDL (Web Services Description Language) to describe operations and message formats. REST (Representational State Transfer) is an architectural style that typically uses HTTP verbs (GET, POST, PUT, DELETE) and JSON or XML payloads.

  • SoapUI: a specialised tool for API testing. Definition: SoapUI is an API functional testing tool that can create requests for SOAP (from WSDL) and REST endpoints, run assertions on responses, and support scripted logic (usually in Groovy). Assumptions: the tester has endpoint URLs and any authentication tokens.

    • Draw the architecture: draw a box labeled "SoapUI (client)" connected by an arrow to a box labeled "API server". If SOAP, show a file labelled "WSDL" feeding into SoapUI; if REST, show JSON payloads in arrows. Label arrow "HTTP(S) request/response".
  • Model-based testing and Tricentis Tosca: Definition: model-based testing is the practice of using a model of the system's GUI or API to generate reusable test artefacts. Tosca (by Tricentis) is a commercial model-based test automation suite that scans applications to create reusable modules (object models), assembles test cases from modules, and executes them with TBox engines.

    • Important Tosca concepts to define: Module (a reusable description of a UI component or API call), TestCase (sequence of steps using modules), TestCaseDesign (data-driven test generation), ExecutionList (collection of TestCases to run). Assumption: Tosca is used with its Tosca Commander GUI and optional ExecutionLists are run by Tosca Engines.

    • Architecture to draw: a box "Tosca Commander" with arrows to "Application Under Test" and to "Test Repository/ExecutionLists". Label modules being scanned from AUT.

  • Mobile UI automation and Appium: Definition: Appium is an open-source server that accepts WebDriver (JSON Wire Protocol / W3C WebDriver) commands and automates iOS/Android apps by talking to the platform's automation framework (XCUITest for iOS, UIAutomator2 or Espresso for Android). Assumption: you have the app under test (APK or IPA), device/emulator and Appium server. Appium 2 defaults to the W3C WebDriver dialect; JSON Wire Protocol is legacy. On iOS, use a .app bundle for Simulator and a properly signed .ipa for real devices.

    • Architecture to draw: a client (test script) box -> arrow to "Appium Server" -> arrow to "Device / Emulator" with actor "UIAutomator2 or XCUITest". Label the arrow from client as "WebDriver commands (HTTP)".
  • Cross-cutting definitions:

    • Assertion: check that a property of a response or UI equals an expected value. Exact: an assertion passes if the predicate on observed data is true; otherwise it fails.
    • Test data binding: mapping input data sets to test steps. In Tosca this is done with TestCaseDesign; in SoapUI Open Source via Groovy/property expansions (ReadyAPI/SoapUI NG Pro provides DataSource and DataSource Loop test steps); in Appium by external data files or parameterized code.

Formulas

curl -X POST "https://api.example.com/login" -H "Content-Type: application/json" -d '{"user":"u","pass":"p"}'

  • A plain way to call REST endpoints from command line. Means: HTTP POST to endpoint with JSON payload.

soapui-project.xml and WSDL import command inside SoapUI GUI

  • In SoapUI import a WSDL: File > New SOAP Project > enter WSDL URL; SoapUI generates request templates.

// Groovy example to read last response in SoapUI def response = context.expand('${TestRequest#Response}')

  • Use inside a TestStep Script assertion. context.expand(...) expands properties; appears in SoapUI scripting sections.

DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformName","Android"); caps.setCapability("app","/path/to/app.apk");

  • Basic Java client-side Appium desired capabilities. platformName and app/appPackage/appActivity tell Appium what to start.

AndroidDriver driver = new AndroidDriver(new URL("http://localhost:4723/"), caps); driver.findElement(By.id("loginButton")).click();

  • Typical Appium client code in Java using Selenium WebDriver APIs.

ActionMode values with the TBox engine: Set, Click, Verify

  • In Tosca, you interact with controls scanned into Modules by setting the ActionMode (e.g., Set, Click, Verify) on Module attributes in a TestCase; these are not standalone modules named TBoxSetValue/TBoxClick/TBoxVerifyValue.

ModuleScan -> Module (reusable) -> TestCase (use modules) -> ExecutionList

  • Tosca process flow: scan application to produce Modules, assemble TestCases from Modules, run via ExecutionLists.

Worked examples

Example 1 — SoapUI: test a REST login endpoint with an assertion.

Given: endpoint https://api.example.com/login, expects JSON { "user": "u", "pass": "p" }, returns 200 and { "token": "abc123", "user":"u" } on success.

Steps:

  1. In SoapUI, create a new REST Project and add a new Resource with path /login and Method POST.
  2. Add a TestSuite > TestCase > TestStep of type REST Request. Paste request body {"user":"u","pass":"p"} and set header Content-Type: application/json.
  3. Run the request; inspect response. Add an assertion: JSONPath Match $.token exists. Add another assertion: Status code equals 200.
  4. Example Groovy script (TestStep "Script Assertion") to assert token length > 0:
    • def resp = context.expand('${REST Request#Response}')
    • def json = new groovy.json.JsonSlurper().parseText(resp)
    • assert json.token?.length() > 0 — if assertion fails SoapUI marks the step failed.

Final result: request returns HTTP 200 and assertion passes; test passes.

Example 2 — Tosca: automate a login dialog using model-based modules.

Given: a Windows desktop application with fields Username (logical name USER), Password (PASS), and Login button (BTN_LOGIN).

Steps:

  1. Use Tosca Commander and run a ModuleScan (XScan) on the application to create Modules for the login window. Modules created: LoginWindow.USER, LoginWindow.PASS, LoginWindow.BTN_LOGIN.
  2. Create a TestCase and drag the three module controls into it. For USER set ActionMode to Set with value student1; for PASS set ActionMode to Set with value pass123; for BTN_LOGIN set ActionMode to Click.
  3. Add a verification step: after click, a label WelcomeMsg should appear. Set ActionMode to Verify on the WelcomeMsg label with expected value Welcome student1.
  4. Execute the TestCase using ExecutionList.

Trace: ModuleScan -> Module items added -> TestCase steps executed in order: set USER, set PASS, click, verify welcome label. If welcome label text matches, test passes.

Example 3 — Appium: automate Android login using Java client.

Given: APK at /apps/myapp.apk; login button has resource-id com.example:id/loginButton; username field id com.example:id/username.

Steps (Java outline):

  1. Start Appium server locally at 4723.
  2. Java code:
    • DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformName","Android"); caps.setCapability("app","/apps/myapp.apk"); caps.setCapability("automationName","UiAutomator2");
    • AndroidDriver driver = new AndroidDriver(new URL("http://localhost:4723/"), caps);
    • driver.findElement(By.id("com.example:id/username")).sendKeys("student1");
    • driver.findElement(By.id("com.example:id/password")).sendKeys("pass123");
    • driver.findElement(By.id("com.example:id/loginButton")).click();
  3. Verify: find element By.id("com.example:id/welcome") and assert text equals Welcome student1.

Final output: element found and assertion true => test passes.

Common mistakes

  • Saying SoapUI is only for SOAP; it supports REST equally and has separate project types.
  • In Tosca, describing TestCases without explaining Modules or the scanning step (XScan/ModuleScan).
  • Giving Appium client code but forgetting to start the Appium server or set correct desired capabilities (platformName, automationName).
  • Mixing locator strategies: using web locators (CSS) for native mobile elements; in mobile use resource-id, accessibility id, XPath carefully.
  • Forgetting to mention the test environment assumptions: device/emulator availability, server endpoints and credentials.

For your exam

Typical questions:

  • Definitions (define SoapUI, Tosca, Appium).
  • Short notes (compare SoapUI and Postman; explain model-based testing in Tosca).
  • Diagrams (draw architecture of Appium or SoapUI client-server interaction).
  • Procedures or step-by-step tasks (how to create a Tosca module and a test case; how to write an Appium script for login).
  • Small code/snippet questions (write desired capabilities or a Groovy assertion).

Full-marks answers must:

  • Define each bold term clearly and state assumptions (e.g., "assume WSDL available", "assume Appium server running").
  • For diagrams: label boxes and arrows clearly (client, server, device, automation engine). Describe what to draw if you cannot show an image.
  • For procedures: list steps in order, name exact buttons/menu items (e.g., Tosca Commander: ModuleScan or SoapUI: New REST Project), and show short code snippets where relevant.

Quick check

  1. What does WSDL stand for and which tool commonly uses it?
  2. Name three Tosca artefacts produced during model-based testing.
  3. In Appium, which capability tells the server which automation backend to use on Android?

Answers: 1. Web Services Description Language; SoapUI commonly uses it for SOAP services. 2. Module (scanned object model), TestCase, ExecutionList (also TestCaseDesign). 3. automationName (e.g., UiAutomator2).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?