Welcome to the Event Manager Company! As a newly hired Software QA Analyst/Developer and a student in software engineering, you are embarking on an exciting journey to contribute to our project aimed at developing a secure, robust REST API that supports JWT token-based OAuth2 authentication. This API serves as the backbone of our user management system and will eventually expand to include features for event management and registration.
Familiarize with REST API functionality and structure: Gain hands-on experience working with a REST API, understanding its endpoints, request/response formats, and authentication mechanisms.
Implement and refine documentation: Critically analyze and improve existing documentation based on issues identified in the instructor videos. Ensure that the documentation is up-to-date and accurately reflects the current state of the software.
Engage in manual and automated testing: Develop comprehensive test cases and leverage automated testing tools like pytest to push the project's test coverage towards 90%. Gain experience with different types of testing, such as unit testing, integration testing, and end-to-end testing.
Explore and debug issues: Dive deep into the codebase to investigate and resolve issues related to user profile updates and OAuth token generation. Utilize debugging tools, interpret error messages, and trace the flow of execution to identify the root cause of problems.
Collaborate effectively: Experience the power of collaboration using Git for version control and GitHub for code reviews and issue tracking. Work with issues, branches, create pull requests, and merge code while following best practices.
Fork the Project Repository: Fork the project repository to your own GitHub account. This creates a copy of the repository under your account, allowing you to work on the project independently.
Clone the Forked Repository: Clone the forked repository to your local machine using the git clone
command. This creates a local copy of the repository on your computer, enabling you to make changes and run the project locally.
Verify the Project Setup: Follow the steps in the instructor video to set up the project using Docker. Docker allows you to package the application with all its dependencies into a standardized unit called a container. Verify that you can access the API documentation at http://localhost/docs
and the database using PGAdmin at http://localhost:5050
.
Explore the API: Use the Swagger UI at http://localhost/docs
to familiarize yourself with the API endpoints, request/response formats, and authentication mechanisms. Swagger UI provides an interactive interface to explore and test the API endpoints.
Run Tests: Execute the provided test suite using pytest, a popular testing framework for Python. Running tests ensures that the existing functionality of the API is working as expected. Note that running tests will drop the database tables, so you may need to manually drop the Alembic version table using PGAdmin and re-run migrations to ensure a clean state.
Increase Test Coverage: To enhance the reliability of the API, aim to increase the project's test coverage to 90%. Write additional tests for various scenarios and edge cases to ensure that the API handles different situations correctly.
Enable Issue Tracking: Enable GitHub issues in your repository settings. GitHub Issues is a powerful tool for tracking bugs, enhancements, and other tasks related to the project. It allows you to create, assign, and prioritize issues, facilitating effective collaboration among team members.
Create Branches: For each issue or task you work on, create a new branch with a descriptive name using the git checkout -b
command. Branching allows you to work on different features or fixes independently without affecting the main codebase. It enables parallel development and helps maintain a stable main branch.
Pull Requests and Code Reviews: When you have completed work on an issue, create a pull request to merge your changes into the main branch. Pull requests provide an opportunity for code review, where your team members can examine your changes, provide feedback, and suggest improvements. Code reviews help maintain code quality, catch potential issues, and promote knowledge sharing among the team.
In this assignment, you will identify, document, and resolve five specific issues related to:
Username validation: Investigate and resolve any issues related to username validation. This may involve handling special characters, enforcing length constraints, or ensuring uniqueness. Proper username validation is essential to maintain data integrity and prevent potential security vulnerabilities.
Password validation: Ensure that password validation follows security best practices, such as enforcing minimum length, requiring complexity (e.g., a mix of uppercase, lowercase, numbers, and special characters), and properly hashing passwords before storing them in the database. Robust password validation protects user accounts and mitigates the risk of unauthorized access.
Profile field edge cases: Test and handle various scenarios related to updating profile fields. This may include updating the bio and profile picture URL simultaneously or individually. Consider different combinations of fields being updated and ensure that the API handles these cases gracefully. Edge case testing helps uncover potential issues and ensures a smooth user experience.
Additionally, you will resolve a sixth issue demonstrated in the instructor video. These issues will test various combinations and scenarios to simulate real-world usage and potential edge cases. By addressing these specific issues, you will gain experience in identifying and resolving common challenges in API development.
To complete this assignment, submit the following:
GitHub Repository Link: Ensure that your repository is well-organized and includes:
Updated README: Replace the existing README with:
Criteria | Points |
---|---|
Resolved 5 issues related to username validation, password validation, and profile field edge cases | 30 |
Resolved the issue demonstrated in the instructor video | 20 |
Increased test coverage to 90% by writing comprehensive test cases | 20 |
Followed collaborative development practices using Git and GitHub (branching, pull requests, code reviews) | 15 |
Submitted a well-organized GitHub repository with clear documentation, links to closed issues, and a reflective summary | 15 |
Total | 100 |
Instructor Videos and Important Links:
Introduction to REST API with Postgres - This video provides an overview of the REST API you'll be working with, including its structure, endpoints, and interaction with the PostgreSQL database.
Assignment Instructions - Detailed instructions on your tasks, guiding you through the assignment step by step.
Git Command Reference I created and some explanation for collaboration with git
Look at the code comments:
User Service - Business Logic - This implements whats called the service repository pattern
Alembic Migration - this is what runs to create the tables when you do alembic upgrade head
See the tests folder for all the tests
API Documentation: http://localhost/docs
- The Swagger UI documentation for the API, providing information on endpoints, request/response formats, and authentication.
Database Management: http://localhost:5050
- The PGAdmin interface for managing the PostgreSQL database, allowing you to view and manipulate the database tables.
Code Documentation: The project codebase includes docstrings and comments explaining various concepts and functionalities. Take the time to read through the code and understand how different components work together. Pay attention to the structure of the code, the naming conventions used, and the purpose of each function or class. Understanding the existing codebase will help you write code that is consistent and integrates well with the project.
Additional Resources:
These resources will provide you with a solid foundation to understand the tools, technologies, and concepts used in the project. Don't hesitate to explore them further and consult the documentation whenever you encounter challenges or need clarification.
This assignment is designed to challenge you, help you grow as a developer, and prepare you for the real-world responsibilities of a Software QA Analyst/Developer. By working on realistic issues, collaborating with your team, and focusing on testing and quality assurance, you will gain valuable experience that will serve you throughout your career.
Remember, the goal is not just to complete the assignment but to embrace the learning journey. Take the time to understand the codebase, ask questions, and explore new concepts. Engage with your team members, seek feedback, and learn from their experiences. Your dedication, curiosity, and willingness to learn will be the key to your success in this role.
We are excited to have you on board and look forward to seeing your contributions to the project. Your fresh perspective and skills will undoubtedly make a positive impact on our team and the quality of our software.
If you have any questions or need assistance, don't hesitate to reach out to your mentor or team lead. We are here to support you and ensure that you have a rewarding and enriching experience.
Once again, welcome to the Event Manager Company! Let's embark on this exciting journey together and create something remarkable.
Happy coding and happy learning!