jsystem.framework.sut
Interface Sut

All Known Implementing Classes:
DefaultSut, SutError, SutImpl

public interface Sut

SUT stands for System/Software Under Test. Usually in your testing lab you will have more then one setup and you would like your test to run on all the setups without making any change to it. Let’s say you are testing a web application, in your lab you have few application servers with deferent URLs, if you hard coded the URL to the test it will be able to run only on one of your application servers. To solve this problem we ask you to define your System/Setup using an XML file.


Method Summary
 List getAllValues(String path)
          Get a list of all the values found.
 byte[] getSutXml()
          return the sut xml.
 String getValue(String path)
          Get a value from the XML file.
 void setSutXml(byte[] sutXml)
          Set the SUT file
 void setSutXml(File sutXml)
          Set the SUT file.
 

Method Detail

setSutXml

public void setSutXml(File sutXml)
               throws Exception
Set the SUT file.

Parameters:
sutXml - The SUT file.
Throws:
Exception

setSutXml

public void setSutXml(byte[] sutXml)
               throws Exception
Set the SUT file

Parameters:
sutXml - The SUT file as a byte array.
Throws:
Exception

getSutXml

public byte[] getSutXml()
return the sut xml.

Returns:
the sut xml as byte array

getValue

public String getValue(String path)
                throws Exception
Get a value from the XML file. In the default implemantation XPath is used.

Parameters:
path - XPath to the requested value.
Returns:
The requested value or null if not found.
Throws:
Exception

getAllValues

public List getAllValues(String path)
                  throws Exception
Get a list of all the values found.

Parameters:
path - XPath to the values.
Returns:
A list of the values.
Throws:
Exception