Project 2 - V&V SW Analysis II
Q1: Perform Static Code Review Analysis for “C:\ ** \LDRA_workarea\ Examples\ C_Testbed_examples\ Testrain\Testrain.c” Generate Code review report and upload them.
Answer:
Objective:
Perform a static code review analysis for the "Testrain.c" file located at "C:**\LDRA_workarea\Examples\C_Testbed_examples\Testrain\Testrain.c" and generate code review reports.
Static Code Review Analysis (LDRA TBrun Tool):
Static code review analysis using the LDRA TBrun tool involves examining the source code of a software application without executing it to identify potential issues, errors, and adherence to coding standards. It primarily focuses on code quality, security vulnerabilities, and standards compliance.
Example: In LDRA TBrun, a static code review analysis could be performed on a C program to check for issues like buffer overflows, uninitialized variables, or violations of coding standards. For instance, it might detect that a variable is being used before it's initialized, helping developers catch potential bugs early in the development process.
Step-by-step procedures:
Step 1: Open LDRA TBrun Tool
Launch the LDRA TBrun Tool on computer.
Step 2: Create a New Project
In LDRA TBrun Tool, open an existing one that includes the "Testrain.c" file.
Step 3: Configure Analysis Settings
Set up the analysis settings, including the coding standard rules, security guidelines, and any specific criteria for the static code review.
Step 4: Run Static Code Review Analysis
Initiate the static code review analysis process for the "Testrain.c" file. The tool will analyze the code for compliance with coding standards, potential vulnerabilities, and code quality issues.
Step 5: Review and Address Findings
Examine the analysis results and identify any issues, violations, or code quality concerns. Address them as needed by making code modifications.
Step 6: Generate Code Review Reports
Generate comprehensive code review reports that include details about code violations, compliance with coding standards, and other relevant metrics.
Step 7: Save the Reports
Save the generated code review reports in a suitable format (e.g., PDF, HTML). Then, upload the reports to the designated location.
Summary:
Static code review analysis is performed using the LDRA TBrun tool to evaluate the "Testrain.c" file. This process involves checking for potential code issues, adherence to coding standards, and code quality without executing the code. The steps include configuring analysis settings, running the analysis, reviewing findings, generating comprehensive reports, and saving/uploading the reports to ensure code quality and compliance with coding standards.
Q2: Perform Integration testing by including all the .C files available in the folder location C:\**\LDRA_workarea\Examples\Toolsuite\Cashregister_6.0\ **
A)Create the test cases manually as well as automatically using TBExtreme and upload the reports.
B)store the test cases as .tcf file. And Upload the location image where the .tcf file is stored.
Answer:
Objective:
Perform integration testing by including all the ".C" files available in the folder location "C:**\LDRA_workarea\Examples\Toolsuite\Cashregister_6.0". This challenge involves creating test cases manually and automatically using LDRA TBExtreme, storing the test cases as .tcf files, and uploading the reports.
Integration Testing:
Integration testing is a software testing technique that evaluates the interactions and compatibility of individual components or modules within a software system when they are combined and executed together. The goal is to ensure that these components work seamlessly as a whole.
Example: Using LDRA TBrun tool, we can perform integration testing by combining various modules of a complex software application and assessing how they interact. For instance, in an automotive control system, we might use LDRA TBrun to verify that the engine control module, brake control module, and transmission control module work together correctly to ensure safe and efficient vehicle operation. The tool can help detect integration issues like data mismatches or communication errors between these modules.
Step-by-step procedures:
Part A: Integration Testing with Test Case Creation
Step 1: Open LDRA TBExtreme
Launch LDRA TBExtreme on your computer.
Step 2: Create a New Project
Create a new project in LDRA TBExtreme and include all the ".C" files located in "C:**\LDRA_workarea\Examples\Toolsuite\Cashregister_6.0".
Step 3: Manual Test Case Creation
Manual test cases are created based on knowledge of the code and its expected behavior.
Navigate to the "Test Cases" or similar section in LDRA TBExtreme “standard- single test cases”.
Create new test cases for the "Cashregister_6.0.c" file:
<!-- [if !supportLists]-->l <!--[endif]-->Define test inputs, including input data and any specific conditions.
<!-- [if !supportLists]-->l <!--[endif]-->Specify expected outputs or behaviors for each test case.
<!-- [if !supportLists]-->l <!--[endif]-->Document any preconditions or postconditions for the tests.
<!-- [if !supportLists]-->l <!--[endif]-->Organize the manual test cases into test sets if needed, grouping them by specific aspects of the code.
Step 5: Execute Manual Test Cases
Run the manual test cases on the "Cashregister_6.0.c" file within LDRA TBExtreme.
Observe the results, including pass/fail status and any captured data or logs.
Step 6: Automatic Test Case Generation
Automatic test case generation can be performed using LDRA TBExtreme's features.
Configure the automatic test case generation settings:
<!-- [if !supportLists]-->l <!--[endif]-->Specify the criteria for generating test cases (e.g., code coverage goals, boundary conditions).
<!-- [if !supportLists]-->l <!--[endif]-->Define the scope of code to target for automatic test case generation.
<!-- [if !supportLists]-->l <!--[endif]-->Run the automatic test case generation process. LDRA TBExtreme will generate test cases based on the criteria specified.
Step 7: Execute Automatic Test Cases
<!-- [if !supportLists]-->l <!--[endif]-->Run the automatically generated test cases on the "Cashregister_6.0.c" file.
<!-- [if !supportLists]-->l <!--[endif]-->Review the results, including pass/fail status and any captured data or logs.
Step 8: Review and Analyze Results
<!-- [if !supportLists]-->l <!--[endif]-->After running both manual and automatic test cases, review the test results.
<!-- [if !supportLists]-->l <!--[endif]-->Pay special attention to failed test cases or areas of code with low coverage.
Step 9: Debug and Refine
<!-- [if !supportLists]-->l <!--[endif]-->In case of test failures or areas with low code coverage, return to the code and make necessary corrections.
<!-- [if !supportLists]-->l <!--[endif]-->Re-run the tests to ensure that the issues have been addressed.
Step 10: Generate Reports
LDRA TBrun provides various reporting options. Generate reports summarizing the results of the unit tests, including code coverage reports.
Part B: Store Test Cases as .tcf Files
Step 1: Save Test Cases
Save the test cases, both manual and automatically generated, in LDRA TBExtreme as .tcf (Test Case File) files.
Step 2:Upload Reports
Generate comprehensive integration testing reports, including code coverage reports. Save these reports in a suitable format and upload them to the designated location.
Summary:
By completing these steps, we can perform integration testing on the ".C" files, both manually and automatically generate test cases, store them as .tcf files, and upload the necessary reports to document the testing process and results.