Vividus Framework Documentation

repository·master·Indexed 19 days ago

https://github.com/vividus-framework/vividus

A testing tool featuring a comprehensive set of Gradle tasks for executing and debugging test stories, validating configurations, and managing step usage. The framework includes a powerful expression language for random data generation (via DataFaker and internal generators), mathematical calculations, string manipulation, Base64 encoding, hashing, resource loading, and script evaluation using JEXL and Groovy.

Tokens
132.3K
Snippets
473
Records
596
Agent score
65%

What's inside Vividus

  1. What is VIVIDUS

    master

    VIVIDUS is a test automation tool designed for test engineers to automate testing across various application types (UI, API, DB) using a single tool and a common language. It is built to be accessible to users without deep programming skills while providing powerful integration points for CI/CD systems.

    Key features include:

    • Test Actions Language: A human-readable, Gherkin-formatted language used to write executable tests. Unlike classical BDD, it is not limited to a specific domain.
    • All-in-one testing: Combines multiple testing tool capabilities into a single application.
    • Ready-to-use: Includes an implemented dictionary of Test Actions, embedded user documentation, and a Test Report module.
    • Open Source: Distributed under the Apache License 2.0.
  2. Visual Testing Plugin Overview

    master

    The Visual Testing Plugin allows you to perform visual regression testing by establishing baselines and comparing current screenshots against them. It supports both Web and Mobile Native applications and provides various shooting strategies to capture screenshots.

    Core Actions:

    • ESTABLISH: Creates a new baseline image.
    • COMPARE_AGAINST: Compares the current screenshot with an existing baseline.
    • CHECK_INEQUALITY_AGAINST: Checks if the difference between the current screenshot and baseline exceeds a specific threshold.
  3. Available VIVIDUS Plugins by Category

    master

    VIVIDUS supports a wide range of plugins to extend its capabilities across different domains. Plugins are categorized into the following groups:

    Cloud Providers

    • AWS: Includes DynamoDB, Kinesis, Lambda, S3, and Secrets Manager.
    • Azure: Includes Resource Manager, Cosmos DB, Data Factory, Event Grid, Event Hub, Functions, Service Bus, Storage Account, and Storage Queue.

    Data Formats

    Supports parsing and interacting with: Avro, CSV, Excel, HTML, JSON, Parquet, XML, and YAML.

    Remoting

    Enables remote execution via: SSH and WinRM.

    Testing Clouds

    Integrations for cloud-based testing platforms: BrowserStack, Mobitru, LambdaTest, and Sauce Labs.

    Specialized Capabilities

    • Web & Mobile: Web Application, Mobile Application, Electron, and Web Application & REST API Integration.
    • Communication & Messaging: Email, Kafka, RabbitMQ, and WebSockets.
    • Databases & Storage: MongoDB, Relational Database, and Redis.
    • Testing & Validation: Accessibility, Applitools (Visual), Lighthouse, Visual Testing, and REST API.
    • System & Utilities: Shell, Date/Time, and WebSocket.
  4. What is context management in VIVIDUS

    master
    In VIVIDUS, "context" or "search context" refers to the specific area within which element lookups are performed. By changing the context, you can restrict searches to a specific element (like a container, table, or div) rather than searching the entire screen. This streamlines test creation, improves efficiency, and reduces the risk of interacting with unintended elements.
  5. How to use the Test Actions Language

    master

    VIVIDUS uses the Test Actions Language to write executable tests. This language is designed to be human-readable and follows the Gherkin format, making it accessible to testers of various technical levels.

    Unlike traditional Behavior Driven Development (BDD) which is often tied to specific business domains, the Test Actions Language in VIVIDUS is generic and can be applied to any application or domain (e.g., UI elements, API datasets, or Database objects).

  6. Select a device in Mobitru using specific capabilities

    master

    You can select a device using standard Selenium Grid capabilities or fine-grained Mobitru device search capabilities.

    Important Constraints:

    • selenium.grid.capabilities.platformName and selenium.grid.capabilities.udid cannot be used simultaneously with Mobitru device search capabilities.
    • You must use only one selection method: either by udids or by search parameters (type, manufacturer, etc.).

    Method 1: Standard Capabilities

    Use these for direct targeting or broad requirements:

    • selenium.grid.capabilities.udid: Target a specific device ID.
    • selenium.grid.capabilities.platformVersion: Target a specific OS version.
    • selenium.grid.capabilities.deviceName: Target a specific device model name.
    # Target by specific UDID
    selenium.grid.capabilities.udid=ce22271b791f6c0603
    
    # Target by platform version
    selenium.grid.capabilities.platformVersion=12
    
    # Target by device name
    selenium.grid.capabilities.deviceName=iPhone 13
  7. Configure Profiles for Browser or Device Specifics

    master

    Profiles allow you to define environment-specific or device-specific properties (e.g., browser type, mobile device settings).

    • Set the profile path using configuration.profiles in configuration.properties.
    • Profiles are loaded sequentially from last to first, allowing you to define common properties in a base profile and specific properties in nested sub-profiles.
    • Note: VIVIDUS does not support running multiple profiles simultaneously; it merges the properties of the selected profile sequence.

    Example Directory Structure:

    src/main/resources/properties
      └─ profile
          ├─ web
          │   ├─ chrome
          │   │   └─ profile.properties
          │   └─ profile.properties
          └─ profile.properties
    # Point to a specific nested profile
    configuration.profiles=mobile_app/android
  8. JSON Path Functions: `distinct()` and `random()`

    master

    The JSON plugin provides two additional functions for use within JSON path expressions:

    1. distinct(): Removes duplicated items from the input array.

      • Example: $.type.distinct() on ["b", "b", "a"] returns ["b", "a"].
    2. random():

      • random(): Returns a single random element from the input array.
      • random(n): Returns an array of n random elements from the input array.
      • Note: Results vary on each execution.

    Example of random(n):

    {
        "numbers": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    }

    Path: $.numbers.random(3) Result: [4, 7, 2] (example output)

    $.type.distinct()
    $.colors.random()
    $.numbers.random(3)
  9. Understand resource check status logic

    master

    When performing resource validation, the system follows a specific fallback mechanism using HTTP methods to determine if a resource is valid.

    1. Initial Check: The system executes a HEAD request for each received value.
    2. Success Condition: If the HEAD request returns a 200 OK status code, the resource validation is considered passed.
    3. Fallback Mechanism: If the HEAD request returns any of the following status codes:
      • 404 Not Found
      • 405 Method Not Allowed
      • 501 Not Implemented
      • 503 Service Unavailable the system will then execute a GET request.
    4. Final Validation: After the fallback GET request:
      • If the status code is 200 OK, the validation is considered passed.
      • Otherwise, the validation is considered failed.
  10. How properties deprecation works in VIVIDUS

    master

    VIVIDUS uses a deprecation mechanism that allows the framework to:

    1. Log a warning when a deprecated property is used.
    2. Treat the deprecated property as if it were the actual (new) property.
    3. Automatically replace the deprecated key with the new key using the replaceDeprecatedProperties command.

    For developers creating modules, deprecations are defined in <module-name>/src/main/resources/properties/deprecated/deprecated.properties using the format <deprecated property>=<actual property>.