1MEIC01T2: TOOP AI - FEUP-MEIC-DS-2024-25/ai4sd GitHub Wiki
The goal of the product is to generate Unit tests to Object Oriented Programming code, while preserving classes relations.
Vision
Our product will run locally on a machine. Given where it runs (root folder), it scans for code files where each function will have a tag for it's relationship with other functions.
The assistant will examine object-oriented codebases and comprehend the code's structure, behavior, and dependencies autonomously. As soon as this information is available, it will create unit tests for every class, method, and reasonable corner case. Its tests will include typical scenarios, boundary conditions, and aspects of exception handling.
Research
To evaluate the most relevant tools for unit test automation in object-oriented programming, we examined JUnit, NUnit, PyTest. These tools provide support for writing and automating unit tests and generating comprehensive tests for object-oriented codebases. Our analysis emphasizes capabilities related to automation, test coverage and ease of use.
JUnit
Language Support: Java Strengths:
- Strong integration with Java IDEs such as Eclipse, IntelliJ IDEA, and VS Code.
- Provides annotations that simplify the creation and execution of unit tests.
- Supports parameterized tests and assertions to cover various test scenarios.
Weaknesses:
- JUnit requires a manual approach to writing tests for each class and method, which might make it less efficient for large projects with complex class relationships.
- Lack of direct support for automatically preserving or understanding class relationships; developers need to create explicit test suites to manage dependencies.
NUnit
Language Support: C#/.NET Strengths:
- Similar to JUnit but focused on the .NET ecosystem, providing a solid framework for unit testing in C# projects.
- Well-integrated with Visual Studio and offers compatibility with CI/CD tools.
- Supports data-driven testing with parameterized test cases, which enhances coverage of different scenarios.
Weaknesses:
- Like JUnit, NUnit requires developers to explicitly create unit tests, and while it is effective for testing individual methods, there is limited automation in preserving class relationships.
- It lacks an autonomous mechanism to understand complex interdependencies among classes, requiring additional effort to create comprehensive test coverage.
PyTest
Language Support: Python Strengths:
- PyTest is known for its simplicity and ease of use, allowing quick setup and effective testing of Python projects.
- It provides extensive plugins to facilitate testing, including fixtures and parameterized tests that ensure good coverage.
- Offers features such as auto-discovery of test cases, which makes it more convenient for developers to organize and run tests.
Weaknesses:
- While PyTest does well with object-oriented Python projects, it lacks a built-in feature for analyzing and preserving class relationships.
- The creation of unit tests still relies heavily on developer input, with no native support for autonomously generating tests for complex dependencies.
Domain Analysis
Activity Diagram
Sequence Diagram
Architecture and design
Technologies
For the tool we use python for backend and frontend. For the frontend we use QTDesigner library, because of it's powerful Design capabilities. As for the Backend and the AI, we'll use the FastAPI library and the gemini AI, since it is the teacher's recommendation and it's free.
Explain the prototype or base implementation that you have implemented in Sprint 0, and how that has informed the rest of the development.
Sprint Retrospective
Sprint 1 Retrospective
What went well?
We did a great job keeping communication straightforward and clear, which made everything run smoothly. Our discussions about code and architecture were really helpful and led to good solutions. We were also well-prepared and quickly got the right tools in place to make things easier.
What went poorly?
We spoke little in class discord and had a poor understanding of business goal.
What can we do to improve?
We can focus on establishing a more structured Git versioning workflow with clearly defined branching strategies. Additionally, we should work on adapting our code further to align more closely to our goal (WebApp).
Sprint 2 Retrospective
What went well?
We managed to conclude most of our hard work in the planned time.
What went poorly?
We had problems integrating our product in the main infrastructure.
What can we do to improve?
We can speak more with the teacher to help us more in some problems that we had related to the integration in the main infrastructure.
Sprint 3 Retrospective
What went well?
We managed to conclude the integration with main infraestructure without major issues.
We resolved some problems by communicating with other teams.
What went poorly?
We struggled to integrate our api in the cloud.
What can we do to improve?
Do not rely only on the teachers for information and try to seek it by other means.
Development guide
Explain what a new developer to the project should know in order to develop the system, including who to build, run and test it in a development environment.
Document any APIs, formats and protocols needed for development (but don't forget that public APIs should also be accessible from the "How to use" above).
Describe coding conventions and other guidelines adopted by the team(s).
Security concerns
Identify potential security vulnerabilities classes and explain what the team has done to mitigate them.
Quality assurance
Describe which tools are used for quality assurance and link to relevant resources. Namely, provide access to reports for coverage and mutation analysis, static analysis, and other tools that may be used for QA.
How to use
Explain how to use your tool from an user standpoint. This can include short videos, screenshots, or API documentation, depending on what makes sense for your particular software and target users. If needed, link to external resources or additional markdown files with further details (please add them to this wiki).
How to contribute
Explain what a new developer should know in order to develop the tool, including how to build, run and test it in a development environment.
Defer technical details to the technical documentation below, which should include information and decisions on architectural, design and technical aspects of the tool.
Contributions
Link to the factsheets of each team and of each team-member. For example:
- Team 2
- Lucas Nakajima (PO)
- Tomás Macedo (SM)
- Rodrigo Pinheiro (DEV)
- Ilies Sghiar (DEV)