Testing

Testing protocol and requirements

Testing Protocol

After implementing the protocol, Onlinesim developers will test it. When you are ready, please send your URL to our support team. After that, your server must be available 24/7. We will start testing as soon as possible. The tests we will conduct:

  1. Simultaneous number issuance for the same service. The most important test. Your system must correctly handle simultaneous requests and must not issue the same number again. For example, the system will send 30 requests with the same criteria: russia, megafon, vk. If you issued a number again - test failed.
  2. Correct handling of activation completion request. Activation management is done ONLY on the Onlinesim side. For reasons beyond our control (network issues), we may not receive a response from you about the successful status change. Therefore, if Onlinesim sends the activation completion status again, you must check for the existence of such an activation by id and if the activation exists, send status SUCCESS. Also, you should NOT complete the activation on your side independently. Only a request from Onlinesim to complete the operation should complete the activation on your side.
  3. SMS Test. After the SMS has reached your database, you must forward it to us as soon as possible. When an SMS arrives - send it to us immediately. If you receive a response with status SUCCESS, mark the SMS in your database as successfully delivered and do not send it again. If a status other than SUCCESS is returned, repeat the request with a 10-second delay until you receive status SUCCESS. If you send the same SMS after we respond to you with status SUCCESS - test failed.
  4. Field types. Carefully check the field types you send via the protocol. If the protocol description says that the field is of numeric type, and you send smsId: «123» - test failed.
  5. The phone number must include the country code. In the phone number request, the field number and in the SMS delivery request, the field phone must be NUMERIC and WITH the country code.
  6. The time to issue a number from you should be minimal. If the time to issue a number is more than 3 seconds - test failed.
  7. The number of numbers returned by the GET_SERVICES request should reflect reality. If you return 100 vk, but in reality there are 30, and 70 requests will return with the response NO_NUMBERS - test failed.
  8. Test for excluding prefixes. You must correctly handle the exceptionPhoneSet field when requesting GET_NUMBER. If you issue a phone number whose prefix is in the list - test failed.