Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 3.36 KB

ManualTests.mdown

File metadata and controls

71 lines (51 loc) · 3.36 KB

MANUAL TESTS

The easiest way to test the BoxTech API is to do it manually, using a REST Client such as Postman (see http://www.getpostman.com) which can be run in your browser or on your desktop.

Signup in the BoxTech sandbox

Point your web browser at http://test-bic-container.herokuapp.com and signup for a new user account. Signup "for Data Access only". Accept Terms and Conditions. Confirm your account activation by clicking the link received by email. You now have a <username> and <password> you can use in the API.

Get hold of Postman

Download Postman to your desktop or run it in your brwoser. Create a (free account) to save your tests for future reference.

Authentication

Now you are in, create a 'New Tab' at the top of the screen New tab in Postman

Configure the BoxTech API Authentification call :

  • key = Content-Type, value = application/x-www-form-urlencoded
  • key = Authorization, value = Basic YmljYXBwOmJpY3NlY3JldGFwcA== Note : the value of the Authorization key is called the <clientid> AUthentication headers

Move to the Body section :

  • select the x-www-url-encoded type of body
  • add 3 values in the body :
  • key = grant_type, value = password
  • key = username, value = <your_username>
  • key = paswsword, value = <your_password>
  • save your work by clicking Save on the right, and store it in a collection you will call BIC BoxTech Authentication body

Click Send : you should get a response which looks like this : Authentication body

Grab the "accessToken" value, in our case : 784b64f338a812343915c6f4734d2f71fe14a68d

Call Tare_kg

In Postman, create a new tab at the top of the screen.

Configure the BoxTech API Tare_kg call :

  • key = Authorization, value = Bearer 784b64f338a812343915c6f4734d2f71fe14a68d (or in your case, Bearer followed by the <accessToken> you saved previously, separated by a blank space)
  • save your work which should look like this : Tare_kg headers

Click Send : you should get a response like this : Tare_kg response

The tare weight of the container is 2232 kg.

Call Tare_lbs

You can practise on your own creating a new test in a new tab to call the tare_lbs service, with the same parameters, to query for the tare weight in lbs.

Same tests in Production

To run the same tests in the BIC BoxTech Production database :