Code Monkey home page Code Monkey logo

mattermost-test-management's Introduction

Mattermost Test Management - Open Tests Initiative

This project was created to increase the quality of Mattermost products by having highly effective, well-thought and well-maintained living test cases through high collaboration and based on industry-accepted best practices.

Contributing

  1. Create or update test cases.
  2. Mark test cases as tested by you.
  3. Enhance GitHub and Zephyr Scale integration.
  4. Improve the web application for test cases.
  5. Assist with the Open Test Initiative.

Project status and Roadmap

This project is actively maintained and owned by the QA Core Team.

Phases:

  1. Open test data and work with test organization.
  2. Open up test contributions from core staff using pull request flow and GitHub approval.
  3. Open up test contributions to the community, especially from the QA Community.
  4. Build web applications for ease of viewing, creation, editing and reporting.
  5. Iterate and improve the Open Test Initiative.

If you're interested in shaping this project, please reach out to our community channel. Say hi, and let us know what you think!

Folder Structure

  1. /data folder: Main folder of the repo where written test cases live primarily. Test cases can be found at /data/test-cases.

    Note: We're still in the process of restructuring the folder at /data/test-cases. The primary goal is to align with our Multi-Product Architecture. The rough structure would be Product > Feature > Client > Test Cases.

  2. /src folder: Scripts used for integrating with our third-party Test Management System. These scripts retrieve or sync information.

Getting started

There are three ways to get started in contributing to this project.

  1. It is highly recommended to open in Gitpod for it provides a fully initialized and readily available environment. After opening it, make and submit changes using your forked repository like this:
    # Add your forked repository as remote
    git remote add fork https://github.com/<username>/mattermost-test-management.git
    
    # Create branch
    git checkout -b <branch_name>
    
    # Once ready, push the current branch to your fork
    git push fork
    
    # Finally, create a PR directly from GitHub

    Note: In Gitpod, if you forget to do the above, pushing a change or branch to the origin will result in a permission error, like this one:

    remote: Permission to mattermost/mattermost-test-management.git denied to <github_handlename>.
    fatal: unable to access 'https://github.com/mattermost/mattermost-test-management.git/': The requested URL returned error: 403
  2. You can also work on your local machine by checking out this repo. Make sure you have Deno installed on your machine to run scripts in the /src folder. See the Deno installation docs for more information.
  3. If you're contributing test cases only where they are written in Markdown files, you may do so directly via this GitHub repo. See the GitHub docs on creating new files and submitting pull requests.

Getting started - adding or updating test cases

  1. View test cases at /data/test-cases. Each test case is written in a Markdown file with two main sections:
    • Frontmatter: for the metadata of a test case where each field is grouped into the categories "required", "optional", and "do not change".
    • Content: for the description and steps information.
  2. When creating a test case:
    • Copy the basic template at data/TEST_CASE_TEMPLATE.md.
    • Update the required information in the Frontmatter section, such as:
      • name - the name of the test case
      • status - with the default value of Approved
      • priority - with the default value of Normal
      • folder - the name of a folder. It should follow the exact name of an existing folder (e.g. Channels for data/test-cases/channels) or a slug equivalent of a new folder (e.g. 2236 Shiny Feature for data/test-cases/channels/2236-shiny-feature).

        Note: 2236 is in the format of YYWW (shortened year and week) and refers to when a feature is introduced.

      • authors - the author's GitHub handle (e.g. @original)
      • team_ownership - (array) the team name; who owns a feature or test case.
      • priority_p1_to_p4 - has the default value of P2 - Core Functions (Do core functions work?)
    • Update/populate the content section fields, such as:
      • Objective (optional)
      • Precondition (optional)
      • Step (array, required)
        • Description (required)
        • Test Data (optional)
        • Expected (optional)
  3. When updating a test case:
    • In addition to the same process when creating a new test case, the submitter should append his/her GitHub handle to authors field, comma-separated (e.g. authors: @original, @updater).
    • To indicate that a test case has been tested by a contributor, the submitter should append his/her GitHub handle and date tested (mm-dd-yyy) to optional tested_by_contributor field, comma-separated (e.g. tested_by_contributor: "@qa_contributor|08-20-2023, @qa_contributor|10-15-2023").
  4. Once changes have been made, run deno task validate and see if all changes are valid. Fix errors that get flagged in the terminal.
  5. Always run deno task check to ensure all formatting is correct and there are no lint errors.
  6. Create a branch and submit changes as a pull request(s).

    Note: It's highly recommended to follow Conventional Commits for the title of the pull request.

Getting started - marking tests as tested by you as a contributor:

  1. Find test cases at /data/test-cases.
  2. Update a test case by adding your GitHub handle and the date (mm-dd-yyyy) when you tested it:
- tested_by_contributor: null
+ tested_by_contributor: "@qa_contributor|08-20-2023"
  • or use commas for multiple testing contributions:
- tested_by_contributor: "@qa_contributor|08-20-2023"

// from same contributor 
+ tested_by_contributor: "@qa_contributor|08-20-2023,@qa_contributor|10-15-2023"

// from different contributor
+ tested_by_contributor: "@qa_contributor|08-20-2023,@another_qa_contributor|10-15-2023"

Getting started - working with integrations

  1. Checkout this repo and make sure that Deno is installed on your local machine or open in Gitpod.
  2. Scripts can be found in the /src folder and are all written in Typescript.
  3. Integrating Zephyr Scale and Jira requires access tokens. You may set these via environment variables or through an .env config file with values for ZEPHYR_TOKEN and JIRA_PAT. See these docs on how to get the access tokens:
  4. See a list of tasks that are available at deno.jsonc. You can also list these tasks using the deno task command at the root of the repository.
    • To start up Silver Bullet (SB), run deno task silverbullet, then navigate to http://localhost:3333.
    • To start the test management site, navigate into the www folder (cd www), run deno task start, then navigate to http://localhost:8000/.
      • The search bar in the left-hand-side (LHS) of the Test Cases page requires Elasticsearch to be running and accessible at http://localhost:9200. You can start this by entering the command docker compose up in the www folder.
  5. Always run deno task check to ensure all formatting is correct and there are no lint errors.
  6. Create a branch and submit changes as a pull request(s).

    Note: It's highly recommended to follow Conventional Commits for the title of the pull request.

pre-commit hook

  1. GitHub Actions runs codespell over your data/ folder and will point out any common spelling mistakes in the Pull Request.
  2. Locally there is .pre-commit-config.yml. You can configure as explained here, precommit
  3. If you want to skip precommit locally, export PRE_COMMIT_ALLOW_NO_CONFIG=1, before running git commit.

License

Licensed under Apache License 2.0. Read the full text here.

mattermost-test-management's People

Contributors

aayushchaudhary0001 avatar collinewait avatar ctlaltdieliet avatar dhaussermann avatar jgilliam17 avatar josephbaylon avatar lindalumitchell avatar lindy65 avatar m-zubairahmed avatar m1lt0n avatar saturninoabril avatar simcard0000 avatar stevemudie avatar sumanpaikdev avatar varghesejose2020 avatar yasserfaraazkhan avatar zefhemel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mattermost-test-management's Issues

Deno task to create test does not recognises new folder created

Steps:

  • run deno task create-template
  • enter test-cases/cloud
  • type y and create a new folder when its asked to create a new-folder
    => verify successful creation the folder and test
  • run deno task create-template again
  • enter test path as test-cases/cloud/new-folder

the Deno task fails to recognise the new-folder test-cases/cloud/new-folder and throws error.

feat: add validation to custom field's "Location"

When validating a test case with deno task validate, it should throw an error whenever the value of Location does not match with the options from Zephyr.

  • see all possible options from Zephyr
  • these options should be added here instead of empty array.

bug: broken web application (/www folder) in Gitpod

Broken web application (/www folder) in Gitpod

With error log:

Listening on http://localhost:8000/
An error occurred during route handling or page rendering. NotFound: No such file or directory (os error 2)
    at async Object.readTextFile (deno:runtime/js/40_read_file.js:56:20)
    at async GET (file:///workspace/mattermost-test-management/www/routes/test-cases/[...slug].tsx:58:25)
    at async https://deno.land/x/[email protected]/mod.ts:228:22
    at async Server.#respond (https://deno.land/[email protected]/http/server.ts:298:18)

Screenshot 2022-12-02 at 8 04 42 PM

Thanks @simcard0000 for reporting the issue!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.