Skip to content

Instantly share code, notes, and snippets.

View cskmnrpt's full-sized avatar
🟢

Manju cskmnrpt

🟢
  • 22:02 (UTC +05:30)
View GitHub Profile

Disable:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Enable:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Integrating Qase with Playwright

In software development, automation is pivotal for ensuring quality and reliability. A well-structured testing process not only conserves time and resources but also enables developers to swiftly identify and address issues. Integrating robust test management tools with versatile automation frameworks is essential to achieving this goal.

For those unfamiliar, Qase is a comprehensive TestOps platform designed to manage both manual and automated tests efficiently. Playwright, a powerful end-to-end testing framework developed by Microsoft, offers an array of features such as automatic waiting, screenshot capture, and video recording. By combining the capabilities of Qase with Playwright, you can streamline your testing workflow and enhance your test management capabilities.

In this guide, we will walk you through the steps to integrate Qase with Playwright using the Qase reporter for a seamless test automation experience. This guide assumes you have basic knowledge of JavaSc

@cskmnrpt
cskmnrpt / tag-defects.txt
Last active March 21, 2024 11:50
This python script will tag all the defects of a specific Test run and update them with the specified tags.
import requests
# Function to make the first API call and retrieve defect IDs
def get_defect_ids(api_token, project_code, run_id):
url = f"https://api.qase.io/v1/run/{project_code}/{run_id}?include=defects"
headers = {
"accept": "application/json",
"Token": api_token
}
response = requests.get(url, headers=headers)
@cskmnrpt
cskmnrpt / clone-run.py
Last active March 6, 2024 17:19
A Python script to clone all test cases that have a particular result into a new test run.
import requests
import json
from datetime import datetime
print("The script will clone all test cases that have a particular result into a new test run. If you have a test case with parametrized result in the existing run, all possible values will be cloned to the new run.")
def make_second_api_call(api_token, project_code, unique_case_ids):
# Print the second API call for verification
print("Second API Call:")
print(f"curl --request POST \\\n"
import requests
def delete_defects(api_token, project_code, defect_ids):
base_url = "https://api.qase.io/v1/defect"
url = f"{base_url}/{project_code}/"
headers = {
"accept": "application/json",
"Token": api_token
}
#!/bin/bash
# Function to prompt user for input and store in variable
get_user_input() {
read -p "$1: " input
echo "$input"
}
# Function to perform the API call for deleting a defect
delete_defect() {
@cskmnrpt
cskmnrpt / clone-run.sh
Last active March 6, 2024 07:38
A bash script to clone all test cases that have a particular result into a new test run.
#!/bin/bash
echo -e "\n The script will clone all test cases that have a particular result into a new test run. If you have a test case with parametrized result in the existing run, all possible values will be cloned to the new run. \n"
# Interactive input for API token, project code, run ID, and desired results to clone
read -p "Enter your API token: " api_token
read -p "Enter your project code: " project_code
read -p "Enter the run ID: " run_id
read -p "Which cases do you want to clone? (e.g., failed, blocked, invalid, passed etc): " clone_status