Project 2 - V&V SW Analysis II
Perform Static Code Review Analysis:
- Open the LDRA tool suite on system.
- Create a new project or open an existing project if available.
- Import the Testrain.c file by selecting the appropriate project options.
- Perform static analysis by selecting "Analyze" > "Static Analysis" or similar.
- Generate a code review report by selecting "Reports" > "Code Review" and configure it to be compliant with the desired coding standards (e.g., MISRA C 2012, CERT).
- Review the generated report for code quality and standards compliance.
- Output/Reports: Code review report compliant to MISRA: C 2012 & CERT standards (2 html reports with no violations)
Static Code Review Analysis is a critical software development practice that involves examining source code without executing it. It aims to identify defects, vulnerabilities, and adherence to coding standards before the code is run or integrated into a larger system. This process helps improve code quality, reduce bugs, and enhance the overall reliability of the software.
Integration Testing:
-
Open the LDRA tool suite on your system.
-
Create a new project or open an existing project if available.
-
Import all .c files from the specified directory into the project.
-
Configure the build settings to include all the necessary files for integration testing.
-
Manually Create Test Cases:
- Identify the integration points and interactions between different modules.
- Create manual test cases that cover various integration scenarios.
- Define inputs, expected outputs, and conditions for each test case.
-
Generate Automated Test Cases with TBExtreme:
- Navigate to the "TBExtreme" section or menu in the LDRA tool suite.
- Set up TBExtreme to automatically generate test cases for the integrated components.
- Configure STUBs to simulate external dependencies if required.
-
Perform Test Execution and Dynamic Analysis:
- Execute both manual and automated test cases against the integrated components.
- During test execution, collect coverage data to understand code coverage.
- Generate Dynamic Code coverage report, Regression report and Testmanager report.
- Output/Reports: Dynamic Code coverage report, Regression report and Testmanager report. (Reports with 100% statement, Branch/Decision and MC/DC coverage and one .tcf file)
-
Review and Analyze Test Results:
- Review the test results, coverage data, and generated reports.
-
Save Test Cases as .tcf Files:
- For manual test cases, create and save them as .tcf files within the LDRA tool suite.
-
Upload Reports and .tcf Files:
- Save the test reports, coverage reports, and .tcf files to a specific directory on your system.
-
Share Location Image of .tcf File Storage:
- Capture a screenshot of the directory where the .tcf files are stored.
A .tcf file is a Test Case File used in software testing to define and manage test cases. Test cases are a set of conditions, inputs, and expected outcomes designed to verify the functionality, behavior, or performance of a software application. .tcf files store the information about these test cases, making it easier to organize, execute, and manage testing activities.
A .tcf file typically contains structured information about test cases, including:
- Test Case Identification: A unique identifier or name for each test case.
- Test Case Description: Detailed description of the test case, including its purpose, objective, and scope.
- Test Case Steps: Sequence of steps to execute during the test, including input data, actions, and expected outcomes.
- Test Data: Input data values or conditions used during the test.
- Expected Results: The anticipated outcome or behavior that the software should exhibit when the test case is executed.
- Test Pass/Fail Criteria: Criteria used to determine whether the test case has passed or failed.
Dynamic Code Coverage Report: Dynamic Code Coverage Reports provide information about the code coverage achieved during the execution of test cases. Code coverage measures the extent to which your source code has been exercised by the executed tests. It helps identify which parts of the code have been executed (covered) and which parts have not (uncovered).
Components of a Dynamic Code Coverage Report:
- Coverage Metrics: These include metrics like statement coverage, branch coverage, path coverage, and more, indicating the percentage of code paths exercised.
- Coverage Visualization: Graphical representations such as coverage flow diagrams show how the code was traversed during testing.
- Detailed Analysis: Specific details about code sections that were covered or not covered, highlighting potential areas of low coverage.
Regression Report: A Regression Report provides insights into the impact of code changes or updates on the existing functionality. It helps ensure that new changes do not inadvertently introduce defects or regressions into the system. Regression testing involves re-running previously executed test cases to validate that existing functionality remains intact.
Components of a Regression Report:
- Test Case Results: Lists the status of test cases (pass, fail, or inconclusive) before and after the code changes.
- Defect Identification: Points out any new failures or issues that have arisen due to the code changes.
- Change Impact Analysis: Helps assess the effect of modifications on existing features and functionality.
Test Manager Report: A Test Manager Report provides a comprehensive overview of the testing process, including test planning, execution, results, and coverage. It helps project managers, stakeholders, and team members understand the progress and quality of the testing efforts.
Components of a Test Manager Report:
- Test Execution Summary: Provides a summary of executed test cases, their results (pass/fail), and any defects found.
- Coverage Summary: Highlights the achieved code coverage for different metrics, such as statement coverage, branch coverage, etc.