You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Test Specification

Overview

The Test Specification will detail a 1:1 mapping from specification to test case.
Each test specification in the list will include:

  • Functional description of what is being tested.
  • Input(actions and/or data)
  • Expected outputs:
    • ... that will cause failure
    • ... that can safely be ignored.

These details will then be used as the basis of each test that is created allowing for better maintainability in the test code.

Operational Test Cases

This section enumerates the various operational tests described in the Test Plan identified from the Functional Specification. This text should form the basis of the Technial Documenation for the specified test class.

Broker Test Suite

The Broker test suite validates that the follow log messages as specified in the Functional Specification.

BRK-1001 : Startup : Version: <Version> Build: <Build>
BRK-1002 : Starting : Listening on <Transport> port <Port>
BRK-1003 : Shuting down : <Transport> port <Port>
BRK-1004 : Ready
BRK-1005 : Stopped
BRK-1006 : Using configuration : <path>
BRK-1007 : Using logging configuration : <path>

These messages should only occur during startup. The tests need to verify the order of messages. In the case of the BRK-1002 and BRK-1003 the respective ports should only be available between the two log messages.

testBrokerStartupConfiguration

Description: On startup the broker must report the active configuration file. The logging system must output this so that we can know what configuration is being used for this broker instance.
Input:
The value of -c specified on the command line.
Output:

<date> MESSAGE BRK-1006 : Using configuration : <config file>

Constraints:
This MUST BE the first BRK log message.
Validation Steps:

  1. This is first BRK log message.
  2. The BRK ID is correct
  3. The config file is the full path to the file specified on the commandline.
testBrokerStartupCustomLog4j

Description:
On startup the broker must report correctly report the log4j file in use. This is important as it can help diagnose why logging messages are not being reported. The broker must also be capable of correctly recognising the command line property to specify the custom logging configuration.
Input:
The value of -l specified on the command line.
Output:

<date> MESSAGE BRK-1007 : Using logging configuration : <log4j file>

Validation Steps:

  1. The BRK ID is correct
  2. This should occur before the BRK-1001 : Startup message
  3. The log4j file is the full path to the file specified on the commandline.
testBrokerStartupDefaultLog4j

Description:
On startup the broker must report correctly report the log4j file in use. This is important as it can help diagnose why logging messages are not being reported.
Input:
No custom -l value should be provided on the command line so that the default value is correctly reported.
Output:

<date> MESSAGE BRK-1007 : Using logging configuration : <$QPID_HOME>/etc/log4j.xml

Validation Steps:

  1. The BRK ID is correct
  2. This occurs before the BRK-1001 startup message.
  3. The log4j file is the full path to the file specified on the commandline.
testBrokerStartupStartup

Description: On startup the broker reports the broker version number and svn build revision. This information is retrieved from the resouce 'qpidversion.properties' which is located via the classloader.
Input: The 'qpidversion.properties' file located on the classpath.
Output:

<date> MESSAGE BRK-1001 : Startup : qpid Version: 0.6 Build: 767150

Validation Steps:

  1. The BRK ID is correct
  2. This occurs before any BRK-1002 listenting messages are reported.
testBrokerStartupListeningTCPDefault

Description:
On startup the broker may listen on a number of ports and protocols. Each of these must be reported as they are made available.
Input:
The default configuration with no SSL
Output:

<date> MESSAGE BRK-1002 : Starting : Listening on TCP port 5672

Constraints:
Additional broker configuration will occur between the Startup(BRK-1001) and Starting(BRK-1002) messages depending on what VirtualHosts are configured.
Validation Steps:

  1. The BRK ID is correct
  2. This occurs after the BRK-1001 startup message
  3. Using the default configuration a single BRK-1002 will be printed showing values TCP / 5672
testBrokerStartupListeningTCPSSL

Description:
On startup the broker may listen on a number of ports and protocols. Each of these must be reported as they are made available.
Input:
The default configuration with SSL enabled
Output:

<date> MESSAGE BRK-1002 : Starting : Listening on TCP port 5672
<date> MESSAGE BRK-1002 : Starting : Listening on TCP/SSL port 8672

Constraints:
Additional broker configuration will occur between the Startup(BRK-1001) and Starting(BRK-1002) messages depending on what VirtualHosts are configured.
Validation Steps:

  1. The BRK ID is correct
  2. This occurs after the BRK-1001 startup message
  3. With SSL enabled in the configuration two BRK-1002 will be printed (order is not specified)
    1. One showing values TCP / 5672
    2. One showing values TCP/SSL / 5672
testBrokerStartupReady

Description:
The final messasge the broker will print when it has performed all initialisation and listener startups will be to log the BRK-1004 Ready message
Input:
No input, all succesful broker startups will show BRK-1004 messages.
Output:

2009-07-09 15:50:20 +0100 MESSAGE BRK-1004 : Ready

Validation Steps:

  1. The BRK ID is correct
  2. This occurs after the BRK-1001 startup message
  3. This must be the last message the broker prints after startup. Currently, if there is no further interaction with the broker then there should be no more logging.
testBrokerShutdownListeningTCPDefault

Description:
On startup the broker may listen on a number of ports and protocols. Each of these must then report a shutting down message as they stop listening.
Input:
The default configuration with no SSL
Output:

<date> MESSAGE BRK-1003 : Shutting down : TCP port 5672

Validation Steps:

  1. The BRK ID is correct
  2. Only TCP is reported with the default configuration with no SSL.
  3. The default port is correct
  4. The port is not accessible after this message
testBrokerShutdownListeningTCPSSL

Description:
On startup the broker may listen on a number of ports and protocols. Each of these must then report a shutting down message as they stop listening.
Input:
The default configuration with SSL enabled
Output:

<date> MESSAGE BRK-1003 : Shutting down : TCP port 5672
<date> MESSAGE BRK-1003 : Shutting down : TCP/SSL port 8672

Validation Steps:

  1. The BRK ID is correct
  2. With SSL enabled in the configuration two BRK-1003 will be printed (order is not specified)
  3. The default port is correct
  4. The port is not accessible after this message
testBrokerShutdownStopped

Description:
Input:
No input, all clean broker shutdowns will show BRK-1005 messages.
Output:

<date> MESSAGE BRK-1005 : Stopped

Constraints:
This is the LAST message the broker will log.
Validation Steps:

  1. The BRK ID is correct
  2. This is the last message the broker will log.

Performance Test Cases

TBC

  • No labels