API TEST TOOL
1. Overview of API Test tool:
This is a tool designed by Harvey Nash developers in order to serve the purpose of testing. This tool helps tester
to check whether the behaviors of the system after using API layer is correct or not correct.
It consist of 3 main functions:
a. Verify Single Request: in order to check following requests: Authentication API, Session Configuration,
Schedule Booking, Schedule Expenditure, Session Close
b. Verify Schedule Booking prototype report: in order to verify the layout together with items located on
it to ensure that it meets requirements’ VivaKi offices
c. Perfomance testing: to measure transaction response times via API Layer and SQL*Net
Screenshot below is an overview of API test tool
1
2. Verify Single request:
Select mode “Single Request” from the menu bar, a “Single Request” window will be displayed:
- URI Template: is a drop down list box, in which contains following URLs:
Authentication API: http://bccmdv/bccapi/Authentication/AuthenticationService.svc/logon
Session Configuration: http://bccmdv/bccapi/Configuration/ConfigurationService.svc/configuration
Session Close: http://bccmdv/bccapi/Authentication/AuthenticationService.svc/logoff
Schedule Booking: http://bccmdv/bccapi/Reporting/BookingService.svc/booking
Schedule Expenditure: http://bccmdv/bccapi/Reporting/ExpenditureService.svc/expenditure
Depending on selected url, corresponding info of Request message wil be displayed
2
2.1 Verifying response message of Authentication API:
- URI Template: http://bccmdv/bccapi/Authentication/AuthenticationService.svc/logon is selected.
- A corresponding info of its response message will be displayed in the Request message areas.
You can edit values of “userId”, “password” by inputting username and password which you use to
access BCC Media Desktop application
3
- Click on “Show Response Data” button, a “Show XML Message” window appears in which displayed its
corresponding info of its Request message.
If the info you input into Request message is valid, in “Show XML Message” window , the value of
“errorDescription” is “0”, “errorDescription” is “No Error”, together with value of “sessionID” will
be displayed. You will copy this value of “sessionId” and paste it to value of “sessionId” for other
Request messages such as Session configuration, Session Close, Schedule Booking or Schedule
Expenditure. By that way, they will share the same session. See the image below in case
{errorCode, errorDiscription}={0, No Error} and it generates value of sessionId successfully
If the info you input into Request message is invalid, in “Show XML Message” window, it will not
generate value of sessionId and the values of {errorCode, errorDescription} ≠{0,No Error}.
Depending on which happens to the system, the values of {errorCode, errorDescription} will be
thrown. It will be the ones mentioned in table “Error/Exception Description” , pls refer to
BCC_DR16759_SRS_Media Reporting API_3.0 – section Appendix E.
4
- The image below show you:
Current Session ID: the sessionID generated through calling API Authentication
Response time: it measures response time after calling API Authentication
5
2.2 Verifying response message of Session Configuration:
- URI Template: url http://bccmdv/bccapi/Configuration/ConfigurationService.svc/configuration is selected.
- A corresponding info of its request message will be displayed.
- Copy value of sessionId generated through calling API Authentication from Current Session ID field by clicking
on Copy button (this button is located right next to the Current Session ID field). This value of sessionId will
automatically paste to the value of corresponding sessionId in Configuration request message areas
- maxRowsPageSize: the maximum records will display per page. You can edit this value, by default it will
display value as “400”.
6
- Click on “Show Response Data” button, a “Show XML Message” window appears in which displayed its
corresponding info of Request message.
If the info you input into Request message is valid, in “Show XML Message” window , the value of
“errorDescription” is “0”, “errorDescription” is “No Error”
If the info you input into Request message is invalid, in “Show XML Message” window, it will not
generate value of sessionId and the values of {errorCode, errorDescription} ≠{0,No Error}.
Depending on which happens to the system, the values of {errorCode, errorDescription} will be
thrown. It will be the ones mentioned in table “Error/Exception Description” , pls refer to
BCC_DR16759_SRS_Media Reporting API_3.0 – section Appendix E
7
2.3 Verifying response message of Schedule Booking :
- URI Template: Schedule Booking: http://bccmdv/bccapi/Reporting/BookingService.svc/booking is selected
- A corresponding info of its request message will be displayed.
- Copy value of sessionId generated through calling API Authentication and paste it to the value of
corresponding sessionId in Booking request message areas
- pageNumber: the current page on which the records will display as XML structure. Assume, the booking
report definition name contains 600 records and you configure the value of maxRowsPageSize is 400. So the
values of pageNumer in this case will be {1,2}. If you input “1” into value of pageNumber, it means if you click
on Show Response Data button, a “Show XML Message” window will display 400 records in XML structure. This
is the records of page 1. If you want to display the rest of records in that report definition name, you have to
input “2” into value of pageNumber, then it will display 200 of left records on page 2
- RPD_TYPE: you can input “C” (Corporate) or “U” (User)
- RPD_CODE: you input the name of booking report definition you want to see XML structure. You should input
the file name in capitalized characters
- START_DATE, END_DATE: the date range you want to search. You should input value in the format like that:
yyyymmdd
8
- Click on Show Report Data With CSV button, associated “Single Page” radio button. It will export the
records of inputted pageNumber into CSV file
- Click on Show Report Data With CSV button, associated “Full Data” radio button. It will export all the
records from selected Booking report definition name into CSV file
- Click on “Show Response Data” button, a “Show XML Message” window appears in which displayed its
corresponding info of Request message.
If the info you input into Request message is valid, in “Show XML Message” window , the value of
“errorDescription” is “0”, “errorDescription” is “No Error”, together with displaying records in
Booking report definition name in XML structure.
9
10
If the info you input into Request message is invalid, in “Show XML Message” window, it will not
generate value of sessionId and the values of {errorCode, errorDescription} ≠{0,No Error}.
Depending on which happens to the system, the values of {errorCode, errorDescription} will be
thrown. It will be the ones mentioned in table “Error/Exception Description” , pls refer to
BCC_DR16759_SRS_Media Reporting API_3.0 – section Appendix E.
2.4 Verifying response message of Schedule Expenditure:
- URI Template: Schedule Expenditure: http://bccmdv/bccapi/Reporting/ExpenditureService.svc/expenditure is
selected
Same actions as section: 2.3 Verifying response message of Schedule Booking
2.5 Verifying response message of Session Close:
- URI Template: http://bccmdv/bccapi/Authentication/AuthenticationService.svc/logoff is selected.
11
- A corresponding info of its request message will be displayed.
- Copy value of sessionId generated through calling API Authentication and paste it to the value of
corresponding sessionId in Booking request message areas
- Click on “Show Response Data” button, a “Show XML Message” window appears in which displayed its
corresponding info of Request message.
If the info you input into Request message is valid, in “Show XML Message” window , the value of
“errorDescription” is “0”, “errorDescription” is “No Error
12
If the info you input into Request message is invalid, in “Show XML Message” window, it will not
generate value of sessionId and the values of {errorCode, errorDescription} ≠{0,No Error}.
Depending on which happens to the system, the values of {errorCode, errorDescription} will be
thrown. It will be the ones mentioned in table “Error/Exception Description” , pls refer to
BCC_DR16759_SRS_Media Repor13ting API_3.0 – section Appendix E.
13