How to use VIVIDUS MCP server to create automated scenarios

The VIVIDUS MCP server exposes core VIVIDUS functionalities to LLMs via the MCP protocol, enabling generation of automated test scenarios leveraging those capabilities.

LLM will access only those steps that are available from plugins included into your test project.

Prerequisites

  1. Copy the below line to dependencies section of the project build.gradle file in your test project

    VIVIDUS MCP server is available starting from version 0.6.16-SNAPSHOT and higher.
    Example 1. build.gradle
    implementation(group: 'org.vividus', name: 'vividus-mcp-server')
  2. Make sure to use Build System 3.0

  3. Update gradlew script in the root of your test project to the latest version:

    1. Go to https://github.com/vividus-framework/vividus-starter/blob/main/gradlew

    2. Copy content of the gradlew script

    3. Replace the content of the gradlew script in the root of the test project with the copied content

AI Assistants

GitHub Copilot in VS Code

  1. Install Visual Studio Code

  2. Open the project with VIVIDUS tests in Visual Studio Code

  3. Set up Copilot in VS Code if it is not done yet

  4. Create a new file at path /.vscode/mcp.json in the root of the project

  5. Add the following configuration into mcp.json file and save it

    Example 2. mcp.json
    {
      "servers": {
        "vividus": {
          "command": "/Users/Bob/Workspace/vividus-sample-tests/gradlew", (1)
          "args": [
            "startMcpServer",
            "-q",
            "-p",
            "/Users/Bob/Workspace/vividus-sample-tests" (2)
          ]
        },
        "playwright": { (3)
          "command": "npx",
          "args": [
            "@playwright/mcp@latest"
          ]
        }
      }
    }
    1 The absolute path to the gradlew executable contained in the tests project
    2 The absolute path to the tests project
    3 The Playwright MCP server is optional and can be used to control browser and generate tests for web-applications
  6. Start the MCP servers by clicking on the ▷ Start buttons on the top of the servers names

  7. Use Copilot in agent mode to generate automated scenarios

Claude Desktop

Claude is a next generation AI assistant built by Anthropic and trained to be safe, accurate, and secure to help you do your best work.

  1. Install Claude Desktop

  2. Open Claude Desktop and navigate to Developer tab in application Settings

  3. Click Edit Config which opens claude_desktop_config.json file that contains MCP server configs

  4. Add the following configuration into claude_desktop_config.json file and save it

    Example 3. claude_desktop_config.json
    {
      "mcpServers": {
        "vividus": {
          "command": "/Users/Bob/Workspace/vividus-sample-tests/gradlew", (1)
          "args": [
              "startMcpServer",
              "-q",
              "-p",
              "/Users/Bob/Workspace/vividus-sample-tests" (2)
          ]
        },
        "playwright": { (3)
          "command": "npx",
          "args": [
              "@playwright/mcp"
          ]
        }
      }
    }
    1 The absolute path to the gradlew executable contained in the tests project
    2 The absolute path to the tests project
    3 The Playwright MCP server is optional and can be used to control browser and generate tests for web-applications
  5. Restart Claude Desktop application