BNS Message load tester

Last updated 10 Feb 2025


 

What is BNS Message?

BNSSMSMessage.exe is an executable which is included with the software allowing load testing by customers in their test environment.  BNS Message was developed by BNS R&D for quality assurance testing of the SMS product before release to customers.  

 

BNS Message is designed to be run in a test environment which is configured with a SMS simulator or a special load test account with a SMS Service provider. 

 

BNS Message use in a production environment should be well managed to avoid any excess costs as a result of generating bulk traffic. 

 

SMTP Section

Create a folder on your system to run the program

 

BNSSMSMessage.exe can be copied into a separate folder structure such as D:BNSMessageLoadTesterSMTP1 

 

SMTP1 is a sub folder where BNSSMSMessage.exe will be located. 

Customers can create additional sub folders SMTP2 etc for different types of tests. 

 

The reason each load test has its own folder is to keep the logs separate and also the configuration ini file unique to that test folder. 

 

Copy the BNSSMSMessage.exe software to your folder

Create a CMD file which will be used to run the program

 

copy this text "D:BNSMessageLoadTesterSMTP1BnsSmsMessage.exe" -SmtpSendUser 1 -Cell 61112869513 -msgauto 320 -P N -dsb 1300 -dsa 2300 -iteration 1

 

Run the SmtpSend1.cmd file

The first time this is run a LOGS sub folder should be created under the SMTP1 folder

 

Check the log to see what happened

 

 

The log file shows what happened.  In this example, port 25 connection was made direct to the SMS Server hosting that IP Address. 

 

BNSSMSMessage.exe constructs the SMS request to number@Normal.sms based on the SmtpSmsDomain-Str value in the ini file.

 

This is a simple example of sending a test SMS message using BNSSMSMessage.exe 

Parameters which can be supplied to BNSSMSMessage.exe

In the example above:

 

-SmtpSendUser 1 in the SMTPSend1.cmd file means to use SmtpUserName1 from the BnsSmsMessage.ini file  

 

-Cell number is the mobile phone number to send the message to.

 

-msgauto 320 is an automatically generated message which is 320 chars in length. This can be increased subject to the settings in the SMS Console and the SMS Server provider limit. 

 

-P N  is the priority to send as.   This must match the application or user priority or it can be a set to a lower normal priority.  -P H is send as high priority.  Note: to send at high priority the SMTPSendUser1 must be registered to send as high priority in the SMS console.

 

-dsb 1300  instructs the SMS Server DO NOT SEND the SMS message before 1pm local server time

 

-dsa 2300 instructs the SMS Server DO NOT SEND the SMS message after 11pm local server time

 

-iteration 1 instructs BNSSMSMessage.exe to generate 1 or more unique SMTP send requests to simulate a business application sending batches of SMS requests

 

 

List of all parameters for BNSSMSMessage.exe

BnsSmsMessage -[SmtpSendUser N SmtpSendBulk N or SqlSendUser N SqlSendBulk N or SqlPurgeUser N] -Cell [CCnnnnnnnnnn] -[Msg "messaage text" or MsgAuto Length] -P [H or N] -iteration N -Ref [value] -Dsb [HHMM] -Dsa [HHMM] -C1..C10 [value]

 

-SmtpSendUser N means to use SmtpUserName1 from the BnsSmsMessage.ini file  

-SmtpSendBulk N  means to use SmtpUserName1 from the bnsmessage.ini file when sending bulk SMTP requests.   

 

-SqlSendUser N is used for SQL API testing.  It is similar to the SMTP and is explained later in this article. 

-SqlSendBulk N is used for SQL API testing.  It is used to generate a bulk submission using SQP API.  This is explained later in this article.

 

-SqlPurgeUser N is used for SQL API testing.  It is used to generate a bulk submission using SQP API.  This is explained later in this article.

 

-Cell number is the mobile phone number to send the message to.

-Msg "Message Text"  

-MsgAuto generates a unique message automatically for testing

 

-P N  is the priority to send as.   This must match the application or user priority or it can be a set to a lower normal priority.  -P H is send as high priority.  Note: to send at high priority the SMTPSendUser1 must be registered to send as high priority in the SMS console.

 

-iteration 1 instructs BNSSMSMessage.exe to generate 1 or more unique SMTP send requests to simulate a business application sending batches of SMS requests

 

-Ref  "Value"  This is reserved for use with SQL API.   It is supplied by the application for work flow purposes.   This reference is stored in the SMS platform and is provided back to the application via the SQL API in all results and failure notifications. This allows the application to match specific transactions sent via SMS and the results in relation to that transaction.  

 

-dsb HHMM  instructs the SMS Server DO NOT SEND the SMS message before HHMM local server time.  This is optional only if you want to nominate a time window.  If this parameter is not specified the SMS will be transmitted immediately. 

 

-dsa HHMM instructs the SMS Server DO NOT SEND the SMS message after HHMM local server time. This is optional only if you want to nominate a time window.  If this parameter is not specified the SMS will be transmitted immediately. -dsb is used in conjunction with -dsa

 

 -C1..C10 "value"  

-C1 means Custom1 metadata to be stored with the SMS request and returned back to the application for both SMTP and SQL API. There are 10 custom fields which can store metadata relevant to your application.   

eg: 

-C1 "Insurance Renewal" 

-C2 "Policy MP93923232322"

 

Bulk SMTP requests

Bulk SMTP utilises the simple broadcast sub-system which is documented https://smskb.bnsgroup.com.au/admin-simplebroadcast

 

BNSSMSMessage -SmtpSendBulk command creates 1 SMTP email containing a list of mobile numbers contained in a TXT attachment.

 

Mobile numbers are incremented from the one supplied in the -Cell parameter.  

 

This is designed to be run in a test environment using SMS simulators or a load test account from a SMS service provider. 

 

Copy this text to create a CMD file called SMTPSendBulk1.CMD

"D:BNSMessageLoadTesterSMTP1BnsSmsMessage.exe" -SmtpSendBulk 1 -Cell 61112869513 -msgauto 320 -P N -dsb 0001 -dsa 2300 -iteration 200

 

When the SMTP message is constructed and sent by BNSSMSMessage one of the FROM SMTP services will process the message and pass it over to a service called BNS Enterprise SMS Submission Simple Broadcast.  This service reads the email extracts the TXT file and writes individual SMS requests into the SMS database ready for transmission. 

 

Confirmations (if configured to return sentfailed results back to the sender) are returned directly to the sender email address defined in -SmtpSendBulk1 user in the BNSSMSMessage.ini file.  


SQL API Section

BNSSMSMessage.ini file - SQL Details section

 

Note:  a registered business application (sender email) in the SMS Console can only be used by 1 RLS SQL login name. 

 

Prerequisites are 

Send a single request per SMS via SQL API

This is achieved using the -SQLSendUser N option similar to SMTP

 

Copy the BNSSMSMessage.exe software to your folder

Create a CMD file which will be used to run the program

note: that the iterations = 100 meaning that 100 SMS will be generated with unique (-msgauto) SMS messages.  You may want to send 1 initially -iteration 1

 

Copy this text to create your SQLSend1.CMD file 

"D:BNSMessageLoadTesterSQL1BnsSmsMessage.exe" -SQLSendUser 1 -Cell 61112869513 -msgauto 320  -P N -dsb 1510 -dsa 2300 -c1 "sales team" -c2 "test" -ref "My tracking reference" -iteration 100

 

In the above example we are setting custom field values and also setting the reference field. 

 

Results sent to the application via SQL API

BNSSMSMessage.exe is a load tester to push messages into the SMS platform.  It does not process or show the results.  To purge the messages from the SQL API table sql_api_to_app_results  a command is used to instruct BNSSMSMessage.exe to purge all results for that SQL user.  

 

Create a cmd file called "SQLPurge1.cmd" 

Enter this command into the file 

"D:BNSMessageLoadTesterSQL1BnsSmsMessage.exe" -SQLPurgeUser 1

 

This instructs BNSSMSMessage.exe to delete all results for the SQL user 1 (SqlRLSUserName1)

 

SQL API Bulk submission (SQL API type 2 records)

 

SQL API interface is documented for developers at https://smskb.bnsgroup.com.au/sqlinterface

 

Bulk submission is designed for sending the same message to many different mobiles.

 

Create a CMD file called SQLSendBulk1.cmd

 

 

"D:BNSMessageLoadTesterSQL1BnsSmsMessage.exe" -SQLSendBulk 1 -Cell 61112869513 -msgauto 320 -P H -dsb 1500 -dsa 2300 -iteration 10

 

BNSSMSMessage.exe creates 1 entry in the sql_api_from_app table as a type 2 Main_App_Message_Type (Bulk SMS via SQL) and inserts 10 unique mobile numbers starting from the one provided and inserts them into Main_App_Bulk_Recipients.    

 

Below shows the example of iteration 10 using the bulk command.  

 

Those unique numbers are highlighted in yellow as shown in SQL Management studio.  

 

 


Using task scheduler 

Task scheduler can be used to automatically run CMD files. 

 

From task scheduler create a simple task

 

 

 

 

 

 

 

Press OK.  You will be asked to enter the password for the account. 

 

For testing you can enable of disable the task which makes load testing easier and more controlled. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Create your own Knowledge Base