Project 2 - V&V SW Analysis II
1.
Step 1: Set Up the Project in LDRA
Open LDRA Testbed: Launch the LDRA Testbed application on your system.
Create a New Project:
- Navigate to
File > New Project. - Enter the project name and save location.
- Click
OKto create the project.
- Navigate to
Configure Project Settings:
- Set up the project environment by specifying the target compiler and linker.
- Go to
Project > Project Settings. - Configure the necessary settings like source file locations, include paths, and compiler options.
Step 2: Import Source Code
- Add Source Files:
- Go to
Project > Add Files. - Browse and select the source files you want to analyze.
- Click
Addto include them in the project.
- Go to
Step 3: Configure Static Analysis Options
- Set Analysis Options:
- Navigate to
Static > Settings. - Configure the static analysis settings according to the coding standards you want to enforce (e.g., MISRA, CERT, etc.).
- Choose the type of analysis you want to perform (e.g., Code Coverage, Code Quality, Complexity Analysis).
- Navigate to
Step 4: Perform Static Analysis
Run Static Analysis:
- Go to
Static > Analyze. - LDRA Testbed will start analyzing the source code based on the configured settings.
- Go to
View Analysis Progress:
- Monitor the progress in the output window.
- Once the analysis is complete, the results will be displayed.
Step 5: Review Static Analysis Results
View Results:
- Navigate to
Reports > Static Analysis Reportto view the detailed results of the analysis. - The report will include issues such as code violations, potential bugs, and areas for improvement.
- Navigate to
Analyze Violations:
- Review the coding standard violations and other issues flagged by the analysis.
- Double-click on any issue to navigate to the corresponding line of code.
Step 6: Generate Reports
Generate Static Analysis Reports:
- Go to
Reports > Generate Reports. - Select the type of report you want to generate (e.g., Summary Report, Detailed Report).
- Customize the report settings if necessary.
- Click
Generateto create the report.
- Go to
Export Reports:
- Save the generated reports in the desired format (e.g., PDF, HTML).
- Specify the location where the reports should be saved.
Step 7: Review and Address Issues
Review Reports:
- Open the saved reports and review the identified issues.
- Prioritize the issues based on severity and impact.
Fix Code Issues:
- Go back to the source code and address the issues highlighted in the static analysis.
- Make the necessary code changes to resolve the violations and improve code quality.
Step 8: Re-Analyze (if necessary)
- Re-Run Static Analysis:
- After fixing the code issues, re-run the static analysis to ensure that the issues have been resolved.
- Repeat the process until the code meets the desired quality standards.
Step 9: Upload and Share Reports
Save Final Reports:
- Save the final static analysis reports after all issues have been addressed.
Upload Reports:
- Use your organization’s file-sharing or document management system to upload the reports.
- If using a platform like SharePoint, Google Drive, or an internal server, follow the respective upload procedures.
2.
Step 1: Identify Functions for Testing
Let's create test cases for the following functions:
- Power Button Long Press to Switch On (US-1)
- "Call the Phone" Icon Functionality (US-5)
- "Dictionary" Icon Functionality (US-6)
Step 2: Create Test Cases Manually
Use a standard test case template to create detailed test cases manually.
Step 3: Create Test Cases Automatically Using TBExtreme
Setting Up TBExtreme
Install TBExtreme: Ensure TBExtreme is installed and properly configured on your system.
Load the Project: Open TBExtreme and load the project related to the mobile phone application.
Automated Test Case Creation
Define Functions for Testing:
- Identify the functions to be tested automatically within TBExtreme.
- Ensure the source code for these functions is accessible to TBExtreme.
Create Test Scripts:
- Use TBExtreme’s scripting capabilities to create test scripts for each function.
- Define the inputs, expected outputs, and test conditions in the script.
Run Automated Tests:
- Execute the test scripts within TBExtreme.
- Capture the results and compare them against the expected outcomes.
Step 4: Execute Test Cases
Manual Test Execution
- Execute the Test Cases:
- Follow the test steps outlined in the manual test cases.
- Record the actual results and update the status of each test case.