This summative assessment builds upon the API developed and enhanced in Formative Assessments 1 and 2. The focus now shifts to rigorous testing, professional deployment, and final refinements. The goal is to ensure the API is robust, secure, performant, and readily accessible.
This group assignment (group of 2) requires you to finalize the Green Academy API by implementing thorough testing strategies, deploying the API to a suitable environment, and addressing any remaining refinements.
Develop a comprehensive testing suite for your API, including:
- Expand unit tests covering critical functionalities such as authentication, authorization, input validation, data access, and error handling.
- Aim for high test coverage using a testing framework like
pytest.
- Implement integration tests to verify interactions between different API components (e.g., views, serializers, models).
- Conduct security testing to identify vulnerabilities.
- Use tools like Postman, OWASP ZAP, or similar to test for:
- SQL Injection
- Cross-Site Scripting (XSS)
- Broken Authentication
- Insecure Direct Object References (IDORs)
- Document the tests performed and the results.
- Evaluate API responsiveness and scalability using tools like Locust, k6, or simple timing scripts.
- Identify performance bottlenecks and suggest optimizations.
- Review and verify the accuracy and completeness of API documentation.
- Ensure all endpoints, request/response formats, authentication requirements, error codes, and examples are correctly documented.
Deploy your API to a suitable environment, such as PythonAnywhere or a similar cloud platform.
- Justify your choice of deployment platform based on ease of use, scalability, cost, and security.
- Document the steps involved in deploying the API, including specific instructions and commands.
- Explain how you configured the API for the deployment environment (e.g., environment variables, database settings).
- Emphasize secure configuration practices.
- Describe how the deployed API will be monitored for performance, errors, and security issues.
- Mention tools or strategies for monitoring.
Finalize your API with the following refinements:
- Conduct a thorough code review and refactor unclear, inefficient, or difficult-to-maintain code.
- Implement any performance optimizations identified during testing.
- Apply necessary security hardening measures based on security test results.
- Ensure API documentation is clear, comprehensive, and easy to navigate.
- Add any missing information or examples.
- Provide clear instructions for setting up, running, testing, and deploying the API.
- Include a summary of the API's features and any known limitations.
- A GitHub repository containing the final project code.
- A well-structured
README.mdfile with:- Detailed setup, running, testing, and deployment instructions.
- Summary of API features and known limitations.
- Changelog of improvements made throughout the project.
- A separate
TESTING_REPORT.mddetailing:- Testing strategies used
- Results of tests (including performance metrics and security testing results)
- Issues identified and addressed
- A
DEPLOYMENT.mdfile documenting:- Deployment process
- Configuration
- Monitoring strategies
- Thoroughness and effectiveness of the testing suite.
- Quality of unit, integration, security, and performance testing.
- Well-documented testing report.
- Appropriate choice of deployment platform.
- Clear and well-documented deployment process.
- Secure configuration and monitoring strategy.
- Quality of code review and refactoring.
- Effectiveness of performance optimizations and security hardening.
- Completeness and clarity of documentation.
- Overall project polish.