Examples of enterprise integration testing
Throughout this book, we will build a secure design for an event ticketing system. Envision a software system that allows a box office or a website to sell tickets to a popular music concert or theatre event. In Chapter 12, we looked at the integration testing of a web service called a MySQL stored procedure, called lock_seats. A significant challenge of developing large software systems is the complexity that comes from the dependency between subsystems. To allow us to test early, we create a stub in MySQL with a hardcode output response dependent on the input:
DELIMITER //
CREATE PROCEDURE lock_seats(IN inseat CHAR(6),OUT result VARCHAR(255))
BEGIN
  IF inseat = "AA101" THEN
    SET result = "Seat AA101 Locked";
  ELSE
    SET result = CONCAT('Seat ', inseat, ' Already Taken');  END IF;
END //
If we have the stored procedure...