Skip to content

Conversation

@EraKin575
Copy link

@EraKin575 EraKin575 commented Dec 27, 2023

Introduction

Run e2e tests for your application via Keploy

Steps

Step 1: Install Docker Mattermost

  • Follow the instructions in this guide to deploy Mattermost on Docker for production use.

Step 2: Setting Up Keploy

Prerequisites:

  • Docker: Ensure that Docker is installed on your system.
  • Golang: Make sure Golang is installed.

Integration Steps:

  1. Creating a Custom Network for Keploy:

    docker network create keploy-network
    

    This network is required for the application container to bridge with Keploy in Docker.

  2. Creating a Keploy Alias:

    alias keployV2='sudo docker run --pull always --name keploy-v2 -p 16789:16789 --privileged --pid=host -it -v "$(pwd)":/files -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy'
    

    This alias simplifies interactions with Keploy.

  3. Creating a Configuration File for Keploy:

    keploy generate-config -p .
    

    This creates a configuration file in your current directory.

  4. Recording Test Cases with Keploy:

    keployV2 record -c "sudo docker compose up" --containerName docker-mattermost-1 --config-path . --buildDelay 5m
    

    This records test cases for Mattermost in Docker with Keploy.

    Access the UI on localhost:8065 for interaction and make some API calls

  5. Testing with Keploy:

    keployV2 test -c "sudo docker compose up" --containerName docker-mattermost-1 --config-path . --delay 200
    

    This allows testing of the Mattermost setup in Docker using Keploy.

  6. Checking Test Sets and Mocks:

    • Review test sets and mocks in the Keploy folder after recording.
    • Navigate to this folder to understand the captured tests and created mocks for Mattermost.

Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
@EraKin575 EraKin575 closed this Dec 27, 2023
@EraKin575 EraKin575 deleted the keploy-integration branch December 27, 2023 06:21
@EraKin575 EraKin575 restored the keploy-integration branch December 27, 2023 06:21
@EraKin575 EraKin575 reopened this Dec 27, 2023
@EraKin575 EraKin575 changed the title Keploy integration run e2e tests with keploy Dec 27, 2023
EraKin575 and others added 5 commits December 27, 2023 12:40
Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Copy link
Contributor

@hanzei hanzei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR 👍

It's an interesting proposal, though I don't think it fits in this repo. Would you be open to submitting a PR to our mono repo instead, which is https://github.com/mattermost/mattermost?

@hanzei hanzei added 2: Dev Review Requires review by a core committer Awaiting Submitter Action Blocked on the author labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2: Dev Review Requires review by a core committer Awaiting Submitter Action Blocked on the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants