support@w4writers.com +44 7743 307695
Oct 21, 2023

Software Quality and Testing

Assignment - Testing

Consider a scenario where a store manager maintains a `list.csv` file, used to track the remaining promotional balance for each customer. For this particular campaign, customers have the opportunity to select three unique items: a computer mouse, a bag, and a study lamp. Importantly, customers may not choose multiple items from the same category - for instance, purchasing two computer mice is disallowed.

The price ranges for these items vary. A computer mouse can cost anywhere between $1 to $300; the bag also ranges from $1 to $300; and the study lamp is priced between $1 to $400. Rest assured, the store has ample stock to fulfill all orders, and customers are given the flexibility to select one, two, or all three items as per their preference.

The specifications for the new program, record.py consists of its four main operations:

• Add function: This feature permits the manager to integrate a new customer into the system. By executing the command python record.py add , the manager can input the prices of the selected items for the new customer. Enter the price of zero if a particular item is not selected by the customer.
• Delete function: This function enables the manager to remove a customer from the system. To do this, run the command python record.py delete .
• Update function: This feature provides the manager with the ability to update the expenses of the items selected by an existing customer. This can be done by running the command python record.py update . Enter the price of zero if a particular item is not selected by the customer.
• Report function: This function gives the manager the ability to review the profit of promotion campaign for each customer. By executing the command python record.py report, the manager can view the expenditure. The expenditure is classified as "Lost" for a certain customer if it falls within the range of $800 to $1000, both inclusive. It is designated as "Low Profit" if it is equal to or greater than $500, but less than $800. Should the expenditure be less than $500, it is categorized as "High Profit".

The detailed description for these functions of the program record.py is given in Appendix A. You are required to play the role as a software tester, undertaking the following tasks.

Task 1: Traceability matrix
Traceability matrix is a useful tool supporting a good test planning as well as efficient test management and control. You are required to create and maintain a traceability matrix (in a tabular format) to map and trace requirements with test assets (including test conditions, test cases, and execution status) created in the whole testing process.
Hint: A sample traceability matrix will be provided in a template (‘SQT_Assignment2_template.doc`). Relevant information about traceability matrix can be found in lectures (e.g., slides 73-75 in Week 5`s lecture and slides 16, 22&41 in Week 6`s lecture).

Task 2: Functional testing
You are required to undertake all activities for the dynamic testing of all four major functions described in the beginning of this document and detailed in Appendix A. Specifically, you should complete the following three sub-tasks:

Sub-task 2.1: Test analysis
You are required to analyse the requirements given in Appendix A on all four major functions of record.py, and define corresponding test conditions, which are normally elaborated into high-level test cases. Note that each defined test condition should be associated with a professional description (in one or two sentences) about "what to test". All test conditions should also be put into the traceability matrix created in Task 1 to map with requirements.
Hint: Relevant information and examples about test analysis and test conditions can be found in lectures (e.g., slides 15-25 in Week 6`s lecture).

Sub-task 2.2: Test design
You are required to design concrete test cases based on the test conditions defined in sub-task 2.1. Note that:
• Each test case should contain concrete values for input data as well as expected result such that they can be directly executed.
• One test condition may be associated with one or more concrete test cases.
• You should select and apply appropriate techniques (e.g., black-box and white-box) when designing test cases for each particular function ("add", "delete", "update", or "report" in record.py).
• All test cases should also be put into the traceability matrix created in Task 1 to map with test conditions as well as requirements.

Sub-task 2.3: Test implementation, execution and reporting
You are required to schedule and execute all test cases designed in sub-task 2.2. You should also analyse and report the results of test execution. Note that:
• Some test cases may have dependency relationships and different orders among them may affect the test results. For example, you may have a test case TC#1 that adds a customer with ID ‘123456` and another test case TC#2 that deletes the customer with ID ‘123456`. In this case, it is better to schedule the execution of TC#1 before TC#2. In a word, as an important activity for test implementation, you should schedule the execution order of test cases in a smart and efficient way.
• Although a template pytest script (‘test_assignment2_xxxxxx.py`) has been provided, it is NOT mandatory for you to execute test cases using pytest. You can choose whatever tool(s) you prefer to undertake the test execution activity. Manual execution without the support of any automation tool is even allowed.
• All test execution results (pass and/or fail) should be analysed, summarised and reported. They should also be recorded in the traceability matrix created in Task 1.

Task 3: Non-functional review

You are required to undertake some static testing activities, especially review, for the non-functional characteristics of the program record.py. You should identify some potential issues of the program with respect to one or more quality characteristics, e.g., performance efficiency and security. You can also suggest some solutions to address these issues such that the program can be improved.

"Add" function
The module ‘addCustomer` is executed as follows:

1. Check whether the provided customer information satisfies the required format/value range given in Table 1. If not, the customer information cannot be added, and the module will return a string "not added". If all the information is valid, go to the next step.

2. Check whether the provided customer ID exists in the file "list.csv". If it already exists, the customer information cannot be added and the module will return a string "not added". If the ID is new (that is, it does not exist in the file), go to the next step.

3. Add the customer information as a new row in the file "list.csv" and return a string "added".
"Delete" function

The module ‘deleteCustomer` is executed as follows:

1. Check whether the provided customer ID exists in the file "list.csv". If the ID does not exist in the file, the module will return a string "not exist". If the ID exists in the file, go to the next step.

2. Delete the row related to the ID from the file "list.csv" and return a string "deleted".
"Update" function

The module ‘updateCustomer` is executed as follows:

1. Check whether the provided customer information satisfies the required format/value range given in Table 1. If not, the customer information cannot be added and the module will return a string "not updated". If all the information is valid, go to the next step.

2. Check whether the provided customer ID exists in the file "list.csv". If the ID does not exist in the
file, the module will return a string "not updated". If the ID exists in the file, go to the next step.

3. Update the row related to the ID in the file "list.csv" with the provided new information, and return a string "updated".
"Report" function

The module ‘reportCustomer` is executed as follows:

1. Check whether the provided customer ID exists in the file "list.csv". If the ID does not exist in the file, the module will return a string "not exist". If the ID exists in the file, go to the next step.

2. Calculate the final expense using the following formula:
Final expense = expense for the mouse + expense for the bag + expense for the lamp

3. Determine the profit evaluation based on the following scheme:

4. The module will return both the final expense (as an integer) and the evaluation (as a string).

Recent Post

Order this Assignment now

Total: GBP120

fables template