Web Technologies COMP6115 Session 2: Planning, Designing, Constructing and Testing Static Web Sites Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University of the West Indies, Cave Hill Campus Barbados 01/12/06 © 2006/2007 Dr. Paul Walcott
Software Validation/Verification 2 What is the difference between validation and verification? What is the difference between validation and verification? Identify test requirements Identify test requirements Develop test cases Develop test cases Execute tests Execute tests Record test results Record test results
Software validation is the process of ensuring that the developed software is the software the customer really wanted Software validation is the process of ensuring that the developed software is the software the customer really wanted This is achieved through constant communication with the customer, verifying requirements and user acceptance testing This is achieved through constant communication with the customer, verifying requirements and user acceptance testing User acceptance testing is when the software is tested by the user; and error or issues are highlighted by them User acceptance testing is when the software is tested by the user; and error or issues are highlighted by them Test Requirements
Software verification is the process of ensuring that the developed software does what the specifications say that it should do Software verification is the process of ensuring that the developed software does what the specifications say that it should do This is achieved through: This is achieved through: –unit testing –system test –integration testing Test Requirements Cont’d
In both software validation and verification test requirements and test cases are identified In both software validation and verification test requirements and test cases are identified The identification of test requirements is fundamental to the testing process The identification of test requirements is fundamental to the testing process Test requirements specify what must be tested Test requirements specify what must be tested Test Requirements Cont’d
Some test requirements for a typical static site might be: Some test requirements for a typical static site might be: –Ensure that all clickable links take the user to the correct page –Ensure that the pages look the same in the following browsers Microsoft Internet Explorer Microsoft Internet Explorer Netscape Navigator Netscape Navigator Test Requirements Cont’d
–Ensure that the detailed news items are summarised properly on the home page (a content issue) –Ensure that all Web pages are valid XHTML 1.0 –Ensure that web pages load within a given time limit (see section on load speeds) Test Requirements Cont’d
Develop Test Cases Tests cases describe the way to execute a test and its expected result Tests cases describe the way to execute a test and its expected result Tests case are made up of: Tests case are made up of: –a pre-condition –a test –a post-condition Test cases are tied to test requirements and are based on the software specifications Test cases are tied to test requirements and are based on the software specifications
Develop Test Cases Cont’d The pre-condition describes the state that the system must be in before a test The pre-condition describes the state that the system must be in before a test A test describes the steps the tester must go through to execute the test A test describes the steps the tester must go through to execute the test The post-condition describes the state of the system after the test is executed The post-condition describes the state of the system after the test is executed
Develop Test Cases Cont’d A test case is said to have passed, if after executing the test case the documented post-condition is the resulting state of the system after the test A test case is said to have passed, if after executing the test case the documented post-condition is the resulting state of the system after the test Otherwise the test has failed. Otherwise the test has failed.
Test Case Examples Pre-condition: Pre-condition: –The user is at the home page of the COMP1130 course Web site Test Test –Click on the Contact link Post-condition Post-condition –The contact page is displayed
Test Case Examples Cont’d Pre-condition: Pre-condition: –The user is at the home page of the COMP1130 course Web site Test Test –Click on the Schedule link Post-condition Post-condition –The Schedule page is displayed
Test Case Examples Cont’d Pre-condition: Pre-condition: –The user is at the Contact page of the COMP1130 course Web site Test Test –Click on the Home link Post-condition Post-condition –The user returns to the home page
Test Case Examples Cont’d Pre-condition: Pre-condition: –The user is at the Schedule page of the COMP1130 course Web site Test Test –Click on the Home link Post-condition Post-condition –The user returns to the home page
Recording Test Results It is important to record test results since they: It is important to record test results since they: –Serve as a record of what tests have been run –Serve as a record of those test that have passed and failed –Allow the replication of software errors
HTML Validator Run an HTML validator on the Web site as part of tests and fix any issues Run an HTML validator on the Web site as part of tests and fix any issues
Software Evolution As the needs of the client changes so must the software As the needs of the client changes so must the software Software evolution may either be bug fixing (fixing errors) or software enhancement (adding new features) Software evolution may either be bug fixing (fixing errors) or software enhancement (adding new features)
Software Evolution After the new requirements have been identified each of the software development steps (specification, development, validation) must be repeated After the new requirements have been identified each of the software development steps (specification, development, validation) must be repeated
References [1] Darnell, Rick, et al., “HTML4: Unleased”, Sams.net Publishing, First Edition, 1997 [2] Zhao, Jensen J., “Web design and development for e-business”, Prentice Hall, 2003