Skip to content

inistack/python_integration_testing

Repository files navigation

Python Integration Testing

The purpose of this repository is to demonstrate Python integration testing using Pytest and Playwright. Pytest is commonly used for writing and executing tests in Python. Playwright is a popular testing framework and browser automation framework which enables reliable end-to-end testing for modern web apps.

Setup and Installation

Before you proceed, ensure that you have Python3.x and pip install on your computer.

Step 1: Clone this repository and navigate to the code directory as shown below:

git clone https://github.com/ginjardev/python_integration_testing.git
cd python_integration_testing

Step 2: Create a virtual environment in your project folder with the following command on the terminal:

python3 -m venv env

Step 3: Activate the environment:

source env/bin/activate

Step 4: Install the dependencies from the cloned project directory:

pip install -r requirements.txt

Authentication

Step 5: Set LambdaTest Username and Access Key in environment variables.

In order to run your tests on LambdaTest cloud platform, you will need to set your LambdaTest profile username and access key in the environment variables. Click the Access Key button at the top-right of the Automation Dashboard to access it.

See image below:

username_access_key

  • Linux/mac OS
export LT_USERNAME="YOUR_USERNAME" 
export LT_ACCESS_KEY="YOUR ACCESS KEY"
export API_KEY="YOUR FREECURRENCY API"
  • Windows
set LT_USERNAME="YOUR_USERNAME" 
set LT_ACCESS_KEY="YOUR ACCESS KEY"
set API_KEY="YOUR FREECURRENCY API"

Executing The Test

Step 6: From the base repository, execute the command below in your terminal.

pytest -s

Your test results would be displayed on the console and on LambdaTest automation dashboard.

Results

View test results on LambdaTest web automation dashboard.

result

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages