My QA Projects

QA Projects I was involded.

View on GitHub

Examples to use Python

1. Test Automation

Frameworks 

test VR game’s login functionality using Selenium 

ensuring it handles valid and invalid credentials correctly.

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome()  # Adjust for your browser
driver.get("https://www.example-vr-game.com")

# Login form elements
username_field = driver.find_element(By.ID, "username")
password_field = driver.find_element(By.ID, "password")
login_button = driver.find_element(By.ID, "login")

# Test with valid credentials
username_field.send_keys("validuser")
password_field.send_keys("validpassword")
login_button.click()

# ... Perform assertions to check if login was successful

# Test with invalid credentials (similar to the above)

# Close the browser
driver.quit()

2. Performance and Stress Testing:

Libraries 

Example (using requests)

to send a series of API calls to a VR server to simulate a high number of simultaneous users, monitoring response times and resource utilization.

import requests
import time

# Function to simulate a user action
def make_request():
    response = requests.get("https://www.vr-server.com/api/endpoint")
    response_time = response.elapsed.total_seconds()
    print(f"Response Time: {response_time} seconds")

# Stress testing loop
for i in range(1000):  # Number of simulated users
    make_request()
    time.sleep(0.1)  # Adjust sleep time for desired load

3. Data Analysis and Visualization

Libraries

Example (using Pandas and Matplotlib)

Analyzing data collected from performance testing to identify performance bottlenecks Create visualizations to present the results.

import pandas as pd
import matplotlib.pyplot as plt

# Load data from a CSV file or other source
data = pd.read_csv("performance_test_results.csv")

# Analyze and visualize the data
average_fps = data["frame_rate"].mean()
plt.hist(data["frame_rate"], bins=20)
plt.xlabel("Frame Rate (FPS)")
plt.ylabel("Frequency")
plt.title(f"Frame Rate Distribution (Average: {average_fps:.2f} FPS)")
plt.show()

4. AR/VR-Specific Libraries:

PyTorch3D:

OpenCV:

5. Integration with Other Tools: