8.4 You have been asked to test a method called catWhiteSpace in a “Paragraph” object that, within the paragraph, replaces sequences of blank characters with a single blank character. Identify testing partitions for this example and derive a set of tests for the catWhiteSpace method Given example scenario is to test a method called “catWhiteSpace” in a “Paragraph” object that, within the paragraph, replaces sequences of blank characters with a single blank character. Testing partitions for the scenario: • Sentences with only single blank characters. • Sentences with sequences of blank characters in the middle of the sentence. • Sentences with sequences of blank characters at the beginning of the sentence. • Sentences with sequences of blank characters at the end of the sentence. Set of example tests for the method ‘catWhiteSpace’: • Testing can only show the presence of errors, not their absence. (only single blank characters) • Testing can only show the presence of errors, not their absence. (several blank spaces in the sentence) • Testing can only show the presence of errors, not their absence. (2 blanks at the beginning) • Testing can only show the presence of errors, not their absence . (2 blanks at the end) • Testing can only show the presence of errors, not their absence. (several blanks at the beginning) • Testing can only show the presence of errors, not their absence . (several blanks at the end) 8.5 What is regression testing? Explain how the use of automated tests and a testing framework such as JUnit simplifies regression testing. Regression testing is the process of running tests for functionality that has already been implemented when new functionality is developed or the system is changed. Regression tests check that the system changes have not introduced problems into the previously implemented code. Automated tests and a testing framework, such as JUnit, radically simplify regression testing as the entire test set can be run automatically each time a change is made. The automated tests include their own checks that the test has been successful or otherwise so the costs of checking the success or otherwise of regression tests is low. 8.6 The MHC-PMS is constructed by adapting an off-the-shelf information system. What do you think are the differences between testing such a system and testing software that is developed using an object-oriented language such as Java? The differences between testing such a system and testing software that is developed using an object-oriented language such as Java are described below; An application system such as MHC-PMS must be tested by considering each requirement and every requirement carefully understood and by developing test cases. It should be tested that the applications work well in all the cases. The applications adapting an off-the-shelf information system are to be tested from environmental perspectives. 8.7 Write a scenario that could be used to help design tests for the wilderness weather station system. Let’s consider the scenario of a weather station; A high-level testing approach would make the most sense in testing a weather station. Using this approach, you will have a better understanding on who will use this system and how it will be used. The meteorologist would first need to collect data from the weather station and all of the sensors that impact different types of weather. He gets this data and is now able to have an expected output depending on scenarios. Once he has this information, he can now automate the tests and will not have to collect the information manually anymore. For the explanation above, the weather behavior can be designed hence quickening predictions on weather. 8.8 What do you understand by the term ‘stress testing’? Suggest how you might stress test the MHC-PMS. Stress testing is where you deliberately increase the load on a system beyond its design limit to see how it copes with high loads incase loaded. The system should degrade gracefully rather than collapse! The MHC-PMS has been designed as a client-server system with the possibility of downloading to a client. To stress test this system, you need to arrange for Many different clinics to try and access the system at the same time and Large numbers of records to be added to the system. This may involve using a simulation system to simulate multiple users. 8.9 What are the benefits of involving users in release testing at an early stage in the testing process? Are there disadvantages in user involvement? Early involvement in most cases is an advantage. The earlier the testers know what the system does, the users want to see demonstrations of the system in order to satisfy themselves that the system is fully acceptable. The earlier the testers can confirm that these tests are included in their test packs, the faster acceptance testing should be. This could only be a disadvantage where the users negatively interfere with test efforts that the testers are trying to implement during the development. 8.10 A common approach to system testing is to test the system until the testing budget is exhausted and then deliver the system to customers. Discuss the ethics of this approach for systems that are delivered to external customers. In my opinion, basing testing for a system that will be delivered to a customer on cost alone is ethically irresponsible. It is not only irresponsible, but it can also cause deaths and loss of customers. In fact, depending on the nature of the product developed, if the product is used to distribute a certain level of radiation to a patient and it gives them an overdose due to a lack of testing then the company responsible for the product will be in lots of trouble and loss because it will jeopardize the life of the patient! If it is a consumer product and the product keeps on crashing over and over again then they will most likely lose customers and future business due to bad reviews. It is never worth sacrificing testing budget for other things. It is 100% unethical to limit the testing on the budget because the budget may reach the limit while the system still has errors.