When the C++ Expert generates Framework Class files, it also generates a a make
file that can be used to build that client and server. The name of the generated make
file is based on the name of the Contract Repository module and the current platform:
If the Generate Server Test Client and Generate Service Test Logic checkboxes are enabled on the Generate Settings window, a command-line test client and service test logic are also generated.
When Generate Service Test Logic checkbox is enabled, the C++ Expert generates default test logic for all services within a server that relate to a module in the Contract Repository. This test logic will log all the service input arguments to the BEA TUXEDO When the Generate Server Test Client checkbox is enabled, the C++ Expert generates a command-line test client you can use to exercise all the services within the server. When the test client is run, it will perform these actions for each service:
userlog
file, assign static values to all output arguments (based on their type) and return an appropriate reply.
You can use the Configuration Expert to generate a BEA TUXEDO configuration file (a ubbconfig
file) with information necessary for BEA TUXEDO to boot the servers. Once the servers are running, you can use the command-line client to test the generated default logic for the services.
Once you have built, configured and booted the application, you are ready to run test client. The test client is a command-line client that prompts you for input, accesses the service and returns the results of the call to the service.
To run the test client:
\TUXBldr\CPPExpert\output\BANKAPP\
)
The following code listing shows the output you can expect to see when you run the test client. (Sample user input is shown in bold.)
Listing 3-1
Example of Running the Test Client
C:\
TUXBldr\
CPPExpert\output\Bankapp>bankapp_tst
Testing Service Implementation Class: Teller and service: DEPOSIT
<< Enter the variable ( long ACCOUNT_ID), value:100
<< Enter the variable ( string SAMOUNT), value:100.09
<< Output variable (string SBALANCE), value = STRING VALUE
<< Output variable (string STATLIN), value = STRING VALUE
Testing Interface: Teller and service: INQUIRY
<< Enter the variable ( long ACCOUNT_ID), value:102
<< Output variable (string SBALANCE), value = STRING VALUE
Testing Interface: Teller and service: WITHDRAWAL
<< Enter the variable ( long ACCOUNT_ID), value:102
<< Enter the variable ( string SAMOUNT), value:100.09
<< Output variable (string SBALANCE), value = STRING VALUE
<< Output variable (string STATLIN), value = STRING VALUE
Testing Interface: Backoffice and service: OPEN_ACCT
<< Enter the variable ( long BRANCH_ID), value:20
<< Enter the variable ( string SAMOUNT), value:100.09
<< Enter the variable ( char ACCT_TYPE), value:C
<< Enter the variable ( string LAST_NAME), value:LASTNAME
<< Enter the variable ( string FIRST_NAME), value:FIRSTNAME
<< Enter the variable ( char MID_INIT), value:M
<< Enter the variable ( string SSN), value:666778888
<< Enter the variable ( string ADDRESS), value:def xyz
<< Enter the variable ( string PHONE), value:1112223333
<< Enter the variable ( char OPEN_CR), value:S
<< Output variable (long ACCOUNT_ID), value = 99999999
<< Output variable (string SBALANCE), value = STRING VALUE
<< Output variable (string STATLIN), value = STRING VALUE
Testing Interface: Backoffice and service: CLOSE_ACCT
<< Enter the variable ( long ACCOUNT_ID), value:100
<< Output variable (string SBALANCE), value = STRING VALUE
<< Output variable (string STATLIN), value = STRING VALUE
Testing Interface: Transfer and service: TRANSFER
<< Enter the variable ( long DEBIT_ACCOUNT_ID), value:100
<< Enter the variable ( long CREDIT_ACCOUNT_ID), value: