Skip to content

Tutorial 04 11 Test Traditional Bridge

Matt Linder edited this page Jun 8, 2023 · 13 revisions

Harmony Core Logo

Tutorial 4: Testing Traditional Bridge

Finally, you have all the pieces in place for a working Traditional Bridge implementation. You should now be able to start your service and test the new endpoints that are associated with your Traditional Bridge functions.

Start the Service and Postman

  1. In Visual Studio, press F5 (Start Debugging) to start the self-hosting application. You should see the console window appear, with messages confirming that your service is running.

  2. Start the Postman utility.

Create a new Postman Collection

  1. In Postman, create a new collection named Traditional Bridge Tests.

  2. Go to the Variables tab, create a new variable ServerBaseUrl and set it to https://localhost:8086.

    Variables tab

Test GetEnvironment

  1. Right-click the Traditional Bridge Tests collection, select Add Request, and set Request name to GetEnvironment.

  2. Set the URL to {{ServerBaseUrl}}/BridgeMethods/GetEnvironment, and make sure the dropdown to the left of the URL is set to GET.

    GetEnvironment URL

  3. Click Save and then click the big blue Send button.

If all is well, you should see an HTTP 200 OK response, and the response body should contain something like:

DBL/MS-WINDOWS Version 12.1.1

Test GetLogicalName

  1. Right-click the Traditional Bridge Tests collection, select Add Request, and set Request name to GetLogicalName.

  2. Set the URL to {{ServerBaseUrl}}/BridgeMethods/GetLogicalName, and in the dropdown to the left of the URL, select POST.

  3. Under the URL, select Body, Raw, and JSON. Then, in the pane below those settings, add the following JSON code:

{
    "aLogicalName":"DBLDIR"
}

GetLogicalName body

  1. Click Save and then click the big blue Send button.

If all is well, you should see an HTTP 200 OK response, and the response body should contain something like:

C:\Program Files\Synergex\SynergyDE\dbl

Test AddTwoNumbers

  1. Right-click the Traditional Bridge Tests collection, select Add Request, and set Request name to AddTwoNumbers.

  2. Set the URL to {{ServerBaseUrl}}/TraditionalBridge/AddTwoNumbers and select POST in the dropdown to the left of the URL.

  3. Under the URL, select Body, Raw, and JSON. Then, in the pane below the Raw and JSON settings, add the following JSON code:

 {
     "number1":1.1,
     "number2":2.2
 }
  1. Click Save and then click the big blue Send button.

If all is well, you should see an HTTP 200 OK response, and the response body should contain something like this:

{
    "result": 3.3000000000
}

That's it! You have successfully implemented and tested a Harmony Core Traditional Bridge environment.

Clone this wiki locally