Skip to content

jainilgupta02/Testings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Python Testing & Coverage Project

Python Tests Coverage CI

This repository demonstrates unit testing, code coverage analysis, and CI automation using Python.

It is part of my DevOps & Cloud Computing practice to understand how testing integrates into real-world CI/CD pipelines.


🚀 What this project demonstrates

  • Writing unit tests using pytest
  • Measuring code coverage with coverage.py
  • Generating HTML coverage reports
  • Uploading coverage to CI tools (Codecov / GitHub Actions)
  • Structuring Python projects for testing
  • Automating tests in CI pipeline

📂 Project Structure

Testings/
│
├── src/              # Application source code
├── tests/            # Unit tests
├── .github/workflows # CI pipeline configuration
├── requirements.txt  # Dependencies
└── README.md

🧠 Application Example

A simple Python calculator supporting:

  • Addition
  • Subtraction
  • Multiplication
  • Division (with error handling)

🧪 Running Tests Locally

Install dependencies:

pip install -r requirements.txt

Run tests:

pytest

Run tests with coverage:

pytest --cov=src

Generate HTML report:

pytest --cov=src --cov-report=html

Open coverage report:

htmlcov/index.html

⚙️ CI Integration

This repository uses GitHub Actions to:

  • Install dependencies
  • Run tests automatically
  • Generate coverage report
  • Upload results to coverage tools

You can view pipeline runs in:

GitHub → Actions tab


📊 Learning Outcomes

  • Understood testing workflow in Python projects
  • Learned coverage metrics and reports
  • Practiced CI pipeline automation
  • Improved code reliability mindset
  • Built portfolio-ready DevOps project

👨‍💻 Author

Jay Gupta DevOps & Cloud Learner (PW Skills)


⭐ Star this repo if you find it useful!

About

Python testing project demonstrating unit testing, coverage analysis, and CI integration using pytest, coverage, and GitHub Actions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages