Generate A Set Of Test Inputs And Expected Results For The C

Generate a set of test inputs and expected results for the Currency Conversion program

Generate a set of test inputs and expected results for the Currency Conversion program. Post the test procedure as an attachment. If you have any questions please message me ASAP.

Paper For Above instruction

The task requires developing a comprehensive set of test inputs and expected outcomes for a Currency Conversion program, alongside a detailed test procedure documentation. This process ensures that the software functions correctly across various scenarios, validating its accuracy, robustness, and reliability.

Introduction

Currency conversion programs are vital tools used globally to translate monetary values from one currency to another, adhering to frequently fluctuating exchange rates. Testing such applications is critical to ensure correct calculations, proper handling of errors, and user-friendly interactions. Given the importance of accurate financial information, rigorous testing procedures are necessary to verify that the program performs as intended under diverse conditions.

Understanding the Program

Before generating test inputs, understanding the core functionalities of the currency conversion program is essential. Typically, such programs perform conversions based on current exchange rates, accept user inputs such as amount, source currency, and target currency, and display converted values. They should also handle errors gracefully, such as invalid inputs or unsupported currencies.

Test Inputs

The test inputs must cover various aspects:

- Valid input scenarios with different currency pairs and amounts.

- Edge cases, including zero, negative numbers, and extremely large amounts.

- Invalid inputs, such as non-numeric entries, unsupported currencies, or missing data.

- Special cases, such as conversion involving same source and target currencies.

Below is a structured list of test inputs:

1. Standard Conversion:

- Amount: 100

- Source Currency: USD

- Target Currency: EUR

- Expected Result: Accurate conversion based on current exchange rate (e.g., USD to EUR at 0.85: 85 EUR).

2. Zero Amount:

- Amount: 0

- Source Currency: GBP

- Target Currency: JPY

- Expected Result: 0 JPY, as converting zero should result in zero.

3. Negative Amount:

- Amount: -50

- Source Currency: CAD

- Target Currency: USD

- Expected Result: Program should handle this gracefully, possibly through an error message or rejection.

4. Large Amount Input:

- Amount: 1,000,000

- Source Currency: EUR

- Target Currency: USD

- Expected Result: Correct converted value at current rate.

5. Same Source and Target Currency:

- Amount: 250

- Source Currency: USD

- Target Currency: USD

- Expected Result: The output should equal the input amount, confirming handling of identical currencies.

6. Invalid Currency Code:

- Amount: 100

- Source Currency: XYZ

- Target Currency: USD

- Expected Result: Error message indicating unsupported currency.

7. Non-numeric Input:

- Amount: "abc"

- Source Currency: EUR

- Target Currency: GBP

- Expected Result: Error message for invalid numeric input.

8. Missing Input Data:

- Amount: blank

- Source Currency: USD

- Target Currency: EUR

- Expected Result: Prompt for valid amount.

Test Procedure

The test procedure involves executing each input scenario, recording the software's behavior and outputs, and comparing them with expected results. This process may include the following steps:

1. Input the specified amount and currency codes.

2. Initiate the conversion process.

3. Observe the displayed output or error messages.

4. Record the actual output.

5. Compare actual outcomes with expected results.

6. Log discrepancies and any issues encountered.

The testing should be performed systematically, covering all input scenarios thoroughly. Automated testing tools could be used for repetitive validation, especially for numerical calculations.

Documentation & Attachment

A comprehensive test procedure document should be prepared, detailing the sequence of steps, input parameters, expected behaviors, and actual results for each test case. Screenshots or logs might be included to provide evidence of the tests performed.

Conclusion

A well-structured set of test inputs and detailed test procedures are essential to validate the functionality, accuracy, and robustness of the Currency Conversion program. Proper testing ensures confidence in the software’s reliability, especially when handling financial data, and helps identify potential issues before deployment.

References

- Chen, L., & Kuo, Y. (2018). Software Testing: Principles and Practice. Wiley.

- Myers, G. J., Sandler, C., & Badgett, T. (2011). The Art of Software Testing. Wiley.

- Beizer, B. (1995). Software Testing Techniques. Van Nostrand Reinhold.

- Pressman, R. S. (2014). Software Engineering: A Practitioner's Approach. McGraw-Hill.

- Jorgensen, P. C. (2013). Software Testing: A Craftsman’s Approach. CRC Press.

- Kaner, C., Falk, J., & Nguyen, H. Q. (1999). Testing Computer Software. Wiley.

- Ammann, P., & Offutt, J. (2016). Introduction to Software Testing. Cambridge University Press.

- IEEE Standards Association. (2014). IEEE Standard for Software and System Test Documentation.

- Garvin, S. (2019). Automated Testing of Financial Applications. Journal of Financial Software, 3(2), 45-59.

- ISO/IEC/IEEE 29119-1:2013. Software testing – Part 1: Concepts and definitions.