0% found this document useful (0 votes)
9 views1 page

Verify Order Costs with MATH Functions

The exercise focuses on verifying the total cost of an order using MATH functions and Buffers in a TestCase. It involves duplicating a previous TestCase, performing calculations for 'Sub-Total' and 'Total', and ensuring the success message is visible. Participants must follow specific instructions and hints to complete the exercise successfully.

Uploaded by

ramyajupally514
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Verify Order Costs with MATH Functions

The exercise focuses on verifying the total cost of an order using MATH functions and Buffers in a TestCase. It involves duplicating a previous TestCase, performing calculations for 'Sub-Total' and 'Total', and ensuring the success message is visible. Participants must follow specific instructions and hints to complete the exercise successfully.

Uploaded by

ramyajupally514
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Exercise 13 – Use MATH Functions

Objective
By the end of this exercise, you will be able to verify the total cost of an order using a Buffer and the appearance of an object
in response to an action in the SUT.

Why is this important?


In order to verify the values, the previously saved Buffer must be used along with calculations using an on-screen message.
These steps allow the TestCase to meet all the verification requirements.

Instructions

1. Duplicate the TestCaseFolder “Exercise 12 - Buffering “; rename it “Exercise 13 - MATH Functions”.


Navigate to Process>>Verification of Prices >>Verification of Prices; expand the TestStep “Verification of
2.
Prices”.
Verify the order “Sub-Total” using:
3. • the Buffer “PriceBlueJeans”;
• the MATH function to multiply the Buffer by the quantity of blue jeans ordered (in this case, 25).
Verify the order “Total” using the MATH function. This requires adding the Buffer “SubTotal” to the shipping
4.
costs (in this case, 10.00).
Navigate to Process>>Verification of Success>>Verify the Order Success; within the TestStep "Verify the
5.
Order Success", verify that “Message Order successful” is visible.

6. Run the TestCase in the ScratchBook.

7. Set the TestCase WorkState to COMPLETED.

8. Save your work.

Hints
» The shipping costs are in column 2; the shipping costs cell is in the drop-down list “Shipping:*”.
» Depending on the SUT, you may need to set the DataType to numeric.
» If the verification fails, make sure to check and adjust your Tosca number formats in Settings>>TBox>>Number
formats.
» The Buffer name must match the exact name used when the Buffer was created.
» Before running the TestCase, make sure that all the TestStepFolders and TestSteps are in the correct order, fitting
to the flow of the SUT.

27

Common questions

Powered by AI

If verification fails, the following troubleshooting steps should be taken: first, check and adjust the number formats in Settings>>TBox>>Number formats in Tosca to ensure compatibility with the SUT. Additionally, ensure Buffer names exactly match those originally created to avoid discrepancies in data retrieval. Finally, confirm that all TestStepFolders and TestSteps are correctly ordered and follow the necessary flow for successful execution .

The order of TestStepFolders and TestSteps is critical in maintaining a logical and efficient TestCase flow, as each step often depends on the successful execution of previous ones. Inconsistent ordering can lead to incomplete verifications or incorrect outcomes, hindering the TestCase's ability to meet its objectives and potentially leading to inaccurate test results .

It is essential to ensure that the DataType is set to numeric when performing price verifications in the SUT. This guarantees that calculations performed using MATH functions, such as multiplication and addition, yield accurate results without encountering data type conflicts that could lead to incorrect verifications .

Matching the exact Buffer name used at its creation is crucial because the TestCase relies on precise data retrieval for verifications. Inconsistencies in naming can cause errors or failures in retrieving the correct values, leading to inaccurate results in calculations and verifications for elements like 'Sub-Total' and 'Total' prices .

Duplicating the TestCaseFolder from 'Exercise 12 - Buffering' to create 'Exercise 13 - MATH Functions' transfers the foundational setup and steps, saving time and ensuring consistency. It allows testers to build upon previously verified setups, focusing on new elements like MATH functions without re-establishing basic configurations, thus enhancing efficiency and accuracy in testing .

Shipping costs significantly impact total order verification as they are a crucial component in calculating the final order value. In the verification process, shipping costs are added to the 'Sub-Total' using MATH functions to obtain the 'Total' order value. Proper integration into the calculation process is essential, requiring precision in data input, accurate arithmetic operations, and confirmation that the shipping cost data is correctly sourced from designated fields .

MATH functions facilitate the testing process by automating complex calculations, such as multiplying the price of an item stored in the Buffer by its quantity to verify the 'Sub-Total,' and adding shipping costs to calculate the 'Total.' This automation reduces manual errors and increases efficiency, ensuring that the TestCase meets all requirements accurately .

Challenges in verifying the 'Message Order successful' may include UI changes, asynchronous loading delays, or differing message formats specific to the SUT. Overcoming these requires implementing wait strategies to ensure message visibility, using dynamic verification methods adaptable to UI variations, and keeping TestCase logic flexible to adjust to message format changes. Proper configuration and synchronization ensure reliable verification results .

Setting the TestCase WorkState to COMPLETED signifies that the TestCase has been successfully executed and all steps have been fulfilled. This is important for tracking progress and maintaining a record of completed work, thereby facilitating project management and ensuring that no TestCases are inadvertently omitted from future test cycles .

A Buffer is used to store values that can be retrieved later for various purposes, such as calculations or verifications. In Exercise 13, the Buffer stores intermediate values like 'PriceBlueJeans' to calculate the 'Sub-Total' and 'Total' order cost by performing arithmetic operations. This is crucial as it ensures the integrity and accuracy of order verifications using on-screen messages, thereby meeting verification requirements effectively .

You might also like