ScriptlessAutomation
  • 👋Welcome to Scriptless Automation
  • Discover More About Automation
    • ⚙️Automation platform intro
    • 💡Advantages of Scriptless Automation
    • 🚀Release Notes
      • 📖Open Code
      • 📕License Code
  • Product tools
    • 📪Pre-request Tools
    • 🔧Project Dependencies
  • Automation Architecture
    • 🎨Flow diagram
  • Get Started
    • 🛠️Start with Automation
    • 📖Open Code Automation
      • 🌏Web Automation
      • ↔️API Automation
    • 🏢Maven Configuration
    • 🗜️Setting Up Maven Project in IntelliJ IDEA
    • 🎛️Scriptless Config
      • 🕸️BrowserConfiguration
        • chrome.properties
      • 👥CommunicationConfiguration
        • SlackConfiguration.properties
      • 📧MailConfiguration
        • gmailCredentials.properties
      • 🛂ReportConfiguration
        • extentReportConfiguration.properties
      • 🕵️TestManagementConfiguration
        • testRail.properties
        • zephyrscale.properties
        • testiny.properties
      • ⚙️testNgConfiguration.properties
    • 🍱TestData Configuration
    • 👨‍💼Gherkin Language and Scriptless Automation Framework
  • Automation Import Notes
    • 🎨Points to Remember
  • Automation Platforms
    • 👾ScriptlessApi Automation
      • 🖊️Introduction
      • 🗜️Api Automation Setup
      • 🔃Supported API Request Types
      • 🪧API Automation Template
      • 📚Example of API Requests
        • ⬇️GET
        • ↕️POST
        • ⤵️PUT
        • ❌DELETE
      • 🎯API Response Validation
      • 👨‍👦API Dependent TestCase
      • 📝Store API Variables
      • 📔API with JSON body
      • 🙋‍♂️Api Wait
      • 🗜️API Schema Validation
      • 🏗️API Tailor-Made coding
      • 👨‍🦯API Support Generator
      • ↘️Api Response Store Objects
      • ✍️API Test Report
      • 🚃Api Response Type Validation
    • 🌐ScriptlessWeb Automation
      • 🖊️Introduction
      • 🗜️Web Automation Setup
      • 🪧Web Automation Template
      • 🧮page_object_locators
      • 📜Web Automation Key Phrases
        • 📃PAGE_NAME
        • ⌛WAIT_TYPE
        • 📜SCROLL_TYPE
        • 👨‍💼ELEMENT_NAME
        • 🏎️ACTIONS
        • ⌨️SEND_KEYS
        • ✔️VALIDATION
        • ✅VALIDATION_TYPE
      • 👨‍👦Web Dependent Test Case
      • 🐒MOCK
      • 🛂AutomationAsserts
      • 🏗️Web Tailor-Made coding
      • 📝Store Web Variables
      • 🤼‍♀️Web & API integration
      • 🖇️Dynamic Strings
      • 🗣️ReadFile Annotation for Custom Code
      • 🖼️Page_Comparison
      • 👨‍💼Gherkin Template for Web Automation
    • 📱Mobile Automation
  • 🪶Automation features
    • 🌲Environment and System Variables
    • 🗝️KeyInitializers
      • Types of KeyInitializers
    • ✍️Reporting
      • Dashboard
      • Category
      • Tests
        • Screenshot Section
    • 👯Parallel Testing
    • 🏗️Tailor-Made Coding
  • ⏩Automation Demo
Powered by GitBook
On this page
  • Overview
  • How It Works
  • Implementation
  • Usage
  • Benefits
  • Considerations
  • Troubleshooting
  • Reports
  • Demo
  • Conclusion
  • Tutorial

Was this helpful?

  1. Automation Platforms
  2. ScriptlessWeb Automation

Web Dependent Test Case

Overview

The DEPENDANT_TEST_CASE feature in web automation allows the reuse of a set of pre-defined test steps from one test case within another. This enables the execution of common setup steps without duplicating code, saving time, and increasing the maintainability of test suites.

How It Works

DEPENDANT_TEST_CASE is used within a test script to call and execute steps from an existing test case. When called, it runs all steps from the dependent test case up to, but not including, the validation steps. This feature is designed to set up a test environment by reusing actions from a reliable, previously executed test.

Implementation

To implement a DEPENDANT_TEST_CASE, you should:

  1. Identify the common steps that are used across multiple test cases.

  2. Create a base test case script with these steps.

  3. Call this base test case at the beginning of other test scripts using the DEPENDANT_TEST_CASE action.

Example Implementation

Base Test Case: search_sanity.csv

PAGE_NAME,WAIT_TYPE,SCROLL_TYPE,ELEMENT_NAME,ACTIONS,SEND_KEYS,VALIDATION,VALIDATION_TYPE
NONE,NONE,NONE,NONE,LOAD_URL,https://www.saucedemo.com/,NONE,NONE
SwagLabs,VISIBILITY,NONE,pageTitle,NONE,NONE,Swag Labs,EQUAL_IGNORE

Dependent Test Case: fillUserDetails_Sanity.csv

PAGE_NAME,WAIT_TYPE,SCROLL_TYPE,ELEMENT_NAME,ACTIONS,SEND_KEYS,VALIDATION,VALIDATION_TYPE
NONE,NONE,NONE,NONE,DEPENDANT_TEST_CASE,search,NONE,NONE
SwagLabs,VISIBILITY,NONE,userName,SEND_KEYS,testuser,NONE,NONE
SwagLabs,VISIBILITY,NONE,password,SEND_KEYS,testpassword,NONE,NONE
SwagLabs,VISIBILITY,NONE,loginButton,CLICK,NONE,NONE,NONE
SwagLabs,VISIBILITY,NONE,errorMessage,NONE,NONE,Epic sadface: Username and password do not match any user in this service,EQUAL_IGNORE

Usage

When creating a new test script that requires steps from an existing test case, use the DEPENDANT_TEST_CASE in the first step of the CSV file to call the necessary base test case.

Benefits

  • Reduces Redundancy: Eliminates the need to rewrite common steps for each test.

  • Saves Time: Decreases the overall test script development and maintenance time.

  • Increases Reliability: Utilizes steps from stable test cases, ensuring consistency across tests.

Considerations

  • When a dependent test case is called, validations are not executed to allow for different validations in the new test case.

  • If the base test case is modified, all dependent test cases must be reviewed to ensure they function as expected.

Troubleshooting

  • Issue: Dependent test case does not execute.

    • Resolution: Check the reference to the dependent test case name for accuracy and ensure it is correctly placed in the CSV file.

  • Issue: Validation steps from the dependent test case are being executed.

    • Resolution: Ensure that the dependent test case is structured to end before validation steps, or that the calling test case properly handles the flow.

Reports

Demo

Conclusion

The DEPENDANT_TEST_CASE feature is a key element in creating efficient and maintainable web automation tests. By leveraging this feature, testers can construct robust test suites that are easier to manage and scale.

Tutorial

PreviousVALIDATION_TYPENextMOCK

Last updated 1 year ago

Was this helpful?

🌐
👨‍👦
Demo
16KB
AutomationReport.html