-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Best Practice Guide]: Continuous Testing Guide and Checklist #110
Comments
Folks like @GodwinShen @mike-gangl @pramirez-nasa are interested in this for the Unity Project. |
I looked into the testing frameworks page (https://nasa-ammos.github.io/slim/docs/guides/software-lifecycle/continuous-testing/testing-frameworks), and there are several additional testing frameworks and tools that might be helpful. We may consider organizing the pros and cons of each framework so that we help users evaluate these tools in the context of their application and development stack to determine which ones are the most suitable for their testing needs. For Mocking and Stubbing:
For Code Analysis and Static Code Checks:
For Security Testing:
For Performance Testing:
For Mobile Testing:
For Test Automation Frameworks:
For Cross-Browser Testing:
For Continuous Integration and Deployment:
For Containerization and Orchestration:
For AI/ML Testing:
|
Very nice @yunks128 - excellent ideas on suggested tools. Would you consider improving our list of recommended CT tools by making a PR for this in https://github.com/NASA-AMMOS/slim/blob/main/docs/guides/software-lifecycle/continuous-testing/testing-frameworks.md ? |
Key phases that are important within a continuous testing pipeline:
Are there any missing phases throughout the development lifecycle? Are there other considerations for high-quality software with reduced risks and faster release cycles? |
I would move (13) after (15) and also move items (2), (3) and (11) [in that order] after (16). The reason for this change is that anything CI/CD does not work until after some kind of testing is established. Reporting really comes after tests. The greatest challenge I have noted in projects isn't CI/CD but actually the dearth of tests in all areas. CI/CD doesn't work without any tests. Note that continuous testing exists without CI/CD. (Example: Build systems like Maven or Make that run tests during development builds.) CI/CD is a mechanism to test combined code bases that promotes visibility to external observers. I'm also considering the extent to which CI/CD should be included here so as not to conflate Continuous Testing and Continuous Integration. |
Continuous testing key phases in 5 steps (updated: removed CI/CD, merged 14 steps)
|
A list of tools and frameworks commonly used for each of the 5 steps in continuous testing: 1. Planning and Design:
2. Test Execution:
3. Feedback and Monitoring:
4. Environment and Data Management:
5. Improvement and Reporting:
|
Continuous testing steps are consolidated into three steps: 1. Planning and Design:
2. Test Implementation:
3. Improvement and Reporting:
|
@yunks128 - to add a bit more about our discussion about a Test Plan Template to offer to projects, that helps them plan for the above workflow with specific action steps they can communicate with their teams. I've put together a draft template and an example for the Unity U-CS project we can use to iterate further. See the below. Thoughts? Are we missing material in the template that is important for drafting a common set of guidelines for continuous testing? CC @NASA-AMMOS/slim-tsc @NASA-AMMOS/slim-community Template
5. Implementation Checklist
Example of using the template for U-CSUnity Common Services (U-CS) Continuous Testing PlanIntroduction:This document aims to provide a general approach to Continuous Testing for Unity Common Services (U-CS) within the Unity project. It encompasses planning, test phases, tool recommendations, and test specifications. 1. Project Overview
2. Test Requirements
3. Testing Workflow Architecturegraph TD;
A[Code]
B
C
A --> B;
B --> C;
subgraph B[Local Testing Venue]
D[Unit Testing]
E[Security Testing]
F[...]
end
subgraph C[Integration Testing Venue]
G[Regression Testing]
H[System Testing]
I[Performance Testing]
J[Security Testing]
K[Requirements Verification & Validation]
L[Deployment Testing]
M[...]
end
4. Test SpecificationsBefore customizing the table entries below, evaluate your project's specific needs and requirements. Add, remove, or modify rows in the table to best represent the phases, tests, tools, and people associated with your testing approach.
5. Implementation Checklist
|
As an alternative to Selenium and while I have not used it myself (yet), I know of other teams who have and who have praised https://github.com/microsoft/playwright (primarily JS but there's support for testing Java and Python too). |
@riverma Thanks for the testing plan template! It looks great. I would suggest adding the following:
|
Sorry for the drive-by comment when I have been unable to stay involved in SLIM over the past year, but I don't believe that xUnit works with Python. Perhaps pytest would be a good recommendation? Here's a snippet from the 2022 JetBrains Python Developers Survey: |
Great recommendations @Scotchester and @tariqksoliman! I agree @yunks128 - we'll need a second pass at some tool recommendations based on:
It'd be great to augment your developer poll and conversation materials with the latest on the above before sharing. |
pre-commit hooks serve as a great supplement to basic scanning and testing. They are also fairly project-agnostic and SLIM could provide a template for basic pre-commit hooks for projects |
@ddalton212 - great idea. We're thinking (depending on the test) that the idea of "testing venue" can convey the need to do some tests on the developer's machine. We've mentioned that in the architecture template above. Sometimes we may want to do both local and server-side - for example if a developer uses GitHub.com's codespaces to make a commit instead of a local terminal a pre-commit hook installed only locally might miss it. Do you have favorite pre-commit hooks you recommend? |
It's difficult to provide a comprehensive list of software recommendations that is consistently updated that we're also expert in using. I found that the OWASP DevSecOps Guideline provides a fairly consistent and technology independent list of software products applicable across various areas of testing concerns. For instance, their list of static code analysis tools are presented here. (This is only one list of several testing area tools in the guide.) Perhaps we should consider listing our preferred tools and then defer to something like OWASP for the more comprehensive list. |
There's a few (https://pre-commit.com/hooks.html). I have implemented the Terraform hooks for some projects. I also enjoy using something like Ruff for Python linting. It can be a helpful bottom layer that prevents broken commits from entering the codebase. Of course, they aren't perfect and can be ignored or cheated if a developer is motivated enough. If that's the case it may be more helpful to have a job that runs this linting in Jenkins or GitHub Actions. |
…n with structure of other similar configs; Minor code changes in response to static analysis…
NASA-AMMOS/slim#110: Functional Pylint static code analysis. ...
Added trade study requirement pulled from scope in #25, since it is a more logical place than a ticket for a specific tool (SCRUB) demonstration. |
…template to explanation. ... Minor edits.
…template to explanation. ... Minor edits.
…t GH action with latest from Python SK.
Co-authored-by: Rishi Verma <[email protected]>
Checked for duplicates
Yes - I've already checked
Describe the needs
We have existing tickets and material related to testing. It would be great to converge these (and add missing capabilities) such that projects can consult a single authoritative guide to understand the architecture and checklist items they should implement for doing continuous testing "right".
Imagine having a recommendation / guide including the following:
See some of our existing tickets:
Existing material:
Tasks
The text was updated successfully, but these errors were encountered: