14
APPLY TESTING TECHNIQUES FOR SOFTWARE DEVELOPMENT ICTPRG529

DipDB_ICTPRG529_PowerPointSlides_Session6

Embed Size (px)

Citation preview

APPLY TESTING TECHNIQUES FOR SOFTWARE DEVELOPMENTICTPRG529

SESSION 6 OVERVIEW

• The test environment

• Test environment

• More complex test environment layers

• Test document completion

• Test cleanup

• Archiving test wares

• A more complex website search

• Searching for hotel whose rooms match a price

• Practice task

 

• Assignment work

Simplified view of user to database interaction

A more realistic environment

Our testing is taking part just between MySQL Workbench and the MySQL DBMS.

There will be other testing e.g. the Webpage usability and functionality testing from the user perspective.

Web Server vs Application Server• In the above diagram are a Web server and an Application server. Not all websites or business computer

environments will have an application server. All websites must be sitting on a web server.

• The web server has the job of communicating over a network (or internet) with end users usually via their web

browsers. The web server will take requests from the users to view a webpage and send back to them what they

were after. The web servers use the HTTP protocol as the communication means between themselves and the

user. The web server’s role traditionally is to serve the webpages to the users and its role used to end there,

however over the years they have been given more and more responsibilities and power.

• The application server normally handles the business logic and processing. It is usually found in larger

organisations or behind more heavily used websites. As well as the duty of handing the business logic, an

application server can also have the responsibilities of load balancing, fail over, state management, resource

management and API services among other things. These topics are outside the scope of this unit, but they are

terms you will come across as a web or web-facing database developer. The application server can also

communicate via other means than HTTP which the web server is restricted to. This allows it to talk to other

computers more easily and securely i.e. the application server might not just be responding to requests from

people. 

• The web server has matured over the years to be able to take on some of the business logic processing. However,

if a website has a large user base with heavy usage, it will usually be too busy to handle the business logic and

database communications as well as serving up the webpages to the users, so some of those tasks are better

handed over to an application server. That way the web server can use all its resources to just concentrate on

getting pages out to users and passing requests from users back into the application server. The web server

would also be missing some of the other important application server capabilities mentioned earlier. However, if

the website has a small user base and is for a small business, the business logic and database communications

could be all handled by the web server. The business logic could be handled on the web server by programming

languages like PHP, .NET or others.

• Once all testing has been concluded, the Test Plan and any

instruments used in the test are archived in case the test needs to

audited later or re-constructed later. To be archived are:

o The Test Plan document

o Instruments used in the test necessary for its re-construction

• The instruments used in our test were:

o The database creation script

o The queries to re-create the website screen prototypes

o The screen dumps of the website prototypes

Archiving tests

Searching for hotels whose rooms match a price

Need an SQL query to find pet-friendly, Brisbane hotels that have rooms priced at $120 or less

A more complex search

• Possible solution for pet-friendly, Brisbane hotels for $120or less for a room:

select hotels.HotelID, hotelName, parkingspaces, PetFriendly,

HotelViewDesc, min(StandardPrice), HotelPhotoName, city

from hotels, cities, rooms, hotelphotos

where cities.cityID = hotels.CityID

and hotels.hotelID = rooms.HotelID

and hotels.HotelID = hotelphotos.HotelID

and city = 'Brisbane‘

and maindisplayphoto = 'Y‘

and PetFriendly = true

group by hotels.HotelID

having min(StandardPrice) <= 120;

SQL query for more complex search

Global Holidays relational database mud map

Global Holidays normalised tables

GlobalHolidays database:Countries (CountryID, Country)Cities (CityID, City, CountryID)Guests (GuestID, [FirstName], [LastName], [Gender{M,F}], [CountryID], JoinDate, [Email], [Password])Hotels (HotelID, HotelName, CityID, [ParkingSpaces], [PetFriendly], [JoinDate], [HotelViewDesc])HotelPhotos (HotelPhotoID, HotelID, HotelPhotoName, MainDisplayPhoto{Y,N})BedTypes (BedTypeID, BedTypeDesc)Rooms (HotelID, HotelRoomNum, BedTypeID, [RoomDesc], [StandardPrice], [Sleeps])Bookings (BookingID, GuestID, HotelID, HotelRoomNum, Checkin, Checkout, [NumGuests]) Notes:- Table names are in bold- Primary keys are underlined- Foreign keys are not explicitly labelled as foreign keys- Columns that can have NULLS i.e. it is optional to enter data in them, are in [square brackets]- Columns where the data entered can only be one of the listed alternatives are in {curly brackets separated by a comma} e.g. Gender {M,F} means a user can only enter a ‘M’, or a ‘F’ (M=Male, F=Female)

The Global holidays database data (1)

Cities

Hotels

Countries

HotelPhotos

The Global holidays database data (2)Rooms

BedTypes

The Global holidays database data (3)Guests

Bookings

ANY QUESTIONS