• No results found

3.2 Design

3.2.4 System architecture

Core

On the Fig. 5, Core module of WSDLTest application is presented with data input and outputs. It can be noticed that core module holds central role in connecting all the WSDLTest modules together. Core Log File Error Messages Formatted data Data File GUI Input EasyWSDL Toolbox Input

Fig. 5 – Core module

In the Fig. 6, main functions of core module are presented. Based on parsed information from WSDL document interface bonded to SOAP [1] connection is found. From this interface all operations are extracted in order to determine what kind of parameters operations require and how many of them. Depending on chosen test mode, which are described further in 3.2.6:

 Given all information about operations and its parameters, GUI creates panel for input values parameters or input of regular expression.

 WSDLTest generates all parameters and performs number of trials given by the user.

38 Determine web service SOAP interfaces Determine web service operations Interpret operation parameters GUI input GUI output Output results to file Output File Loging Log file

Fig. 6 – WSDLTest level 2

3.2.4.1 Output file

The purpose of output file is to present full set of results from semi-automatic and automatic modes. The file is saved as .csv[47] file. Such choice of output format allows for further reuse of data by external tools. The file is human-readable.

Data

Inside of output file, for each web service operation, there are columns with values of generated input parameters. Their number depends on number of input parameters. The output file has results of tests. For each returned value there are two obligatory columns and one optional. The first column, titled using parameter name, contains values taken from returned SOAP message [1]. The second column is titled the same as first with addition of “TypeCompatibility:” at the beginning. This column contains Boolean (Yes/No) information about type compatibility, which indicates compatibility of returned value’s type with type declared in WSDL document. If the oracle (detailed description is provided in section 3.2.6) was declared, inside the file the third column appears. This column is titled in similar manner as previous one, but with addition of “OracleCompatibility:” at the beginning. Third column contains Boolean (true/false) information about compatibility of returned value with previously declared oracle.

Structure of data

The data is sorted in groups, according to operation tested. The schema of output file is presented in Table 2. Each row represents single test for one operation.

39 Operation 1 Input Parameter 1 Name Input Parameter 2 Name

Return Value 1 TypeCompatibility: Return Value 1

OracleCompatibility: Return Value 1

Value 1 Value 1 Value 1 Yes/No true/false

Value 2 Value 2 Value 2 Yes/No true/false

Operation 2 Input Parameter 1 Name

Return Value 1 TypeCompatibility: Return Value 1

OracleCompatibility: Return Value 1 Value 1 Value 1 Yes/No true/false Value 2 Value 2 Yes/No true/false

Table 2 – Structure of data inside results file

40

Graphical User Interface

The GUI introduces means of how user interacts with WSDLTest. As presented on Screenshot 5 the GUI provides the WSDL input address, control pane allowing choosing testing mode and parameters with results returned at the end of this process. Logger events and tree diagram of parsed WSDL document are additional elements of GUI. User can browse interactive tree diagram of WSDL document at any moment after applying WSDL address. Alternatively, instead of the tab with tree diagram user can switch to Info tab, which provides general information about web service and will appear in place of tree diagram.

Logger will output information about WSDLTest operations, communication

processes and error messages. Log is written to output file stored in folder called Log by the name Log_n.txt, where n is order number if more than one log file present, in case of unexpected application termination. Optionally log can displayed messages narrowed to certain levels of importance.

User uses control pane component to choose in few steps possible control ways and provide all necessary data. All program flow steps presented to user are visible on Fig. 7. In first step user can choose one of three possible testing modes: automatic mode, semi- automatic mode and manual mode.

The first of them allow full automation of parameter providing and generations on all possible operations. User can choose how many tests should be performed. Manual mode on the other hand allows choice of one or more possible operations and providing all operation parameters by user. Manual mode provides single cycle testing. Semi-automatic mode combines automatic and manual mode. It allows choosing operations for testing, providing regular expression masks for generated parameters and number of testing cycles.

Start Testing mode decision Manual Semi-automatic Automatic Parameters input Parameters input Operations choice Operations choice Results presentation Do not use Oracle usage

decision Oracle input

End

Use

41 All modes are finalized by results page showing different summaries depending on the mode. Semi-automatic and automatic modes produce also output file with formatted test results.

User can finish whole control cycle by simply quitting whole WSDLTest application by pressing proper button in title bar of application.

Oracle

OPERATION: name

Return value: name1,type: type1

Save

Return value: name2,type: type2

Fig. 8 – Oracle dialog

Oracle creation step of control flow is visible in Fig. 7. This step is an option and during execution of WSDLTest, by default, it is marked as inactive. If user decides to create an oracle for his test, a dialog screen, presented in Fig. 8, will appear. Inside this popup dialog, there is some number of TextInput (field that allows input of any string). Each field is connected to one return value. Oracle as parameters takes only regular expressions, independently of type returned by web service operation. Against provided regular expression, results are later mapped to validate them. Definition and more details about oracle are in available in section 2.2.

SOAPClient

The SOAPClient class provides a basic and simple interface for the rest of WSDLTest modules to communicate with web service. WSDLTest generates SOAP [1] request via createSOAPRequest() method. Moreover, WSDLTest can create SOAP connection and call web service with createSOAPConnection() and callSOAPConnection() methods. SOAPClient waits and saves web services response after calling it SOAP request. After interface is not needed by WSDLTest closeSOAPConnection() method might be called to finish whole process. SOAPClient internal structure is presented on Fig. 9.

42 WSDLTest SOAPClient Create SOAP Connection Create SOAP Request Call SOAP Connection Close SOAP Connection Web services SOAP Server interface

Fig. 9 – Interface structure of SOAPClient class

EasyWSDL Toolbox

EasyWSDL is a library, which implements parser of WSDL and holds several interfaces and methods to traverse WSDL document and obtain needed information. It is used to parse WSDL document from the address applied by user in GUI and to access various objects created while parsing WSDL document.

Related documents