Just started a new project coming from using Eclipse writing JUnit
automation test cases now on my new project we’re using Cucumber to call
Ruby. I’m trying to pass the data below into our backend, then verify
that the data was actually written to the table.
I have zero knowledge of this.
we are using .feature files to make calls to the .rb file.
Here is what I have in the feature file
When the user saves vitals for the patient “10108V420871” and “path”
“{“param” :
{“dfn”:“3”,“duz”:“10000000224”,“locIEN”:“67”,“vitals”:[{“fileIEN”:“1”,“reading”:“200/98”,“qualifiers”:[“23”,“59”,“100”]},{“fileIEN”:“3”,“reading”:“100.3”,“qualifiers”:[“47”,“50”]}]}
}”
Then a successful response is returned
Then the response contains “{“success”:true}”
and in the .rb file
Given(/^When the user saves vitals for the patient “(.*?)”$/) do |pid|
path = String.new(DefaultLogin.rdk_url)
HTTPartyWithBasicAuth.get_with_authorization(path+"/writeback/vitals/save?pid=10108V420871")
here is the error I get when I execute
@F129_VitalSignsWriteBack @US1956_VitalSignsWriteBack1 @F129 @US1956
@debug @broken
Feature: - Vital Signs - Add Vital Signs/BMI write-back RPC to RDK
Scenario: Vital Signs write back (save) from postman
features/F129_VitalSignsWriteBack.feature:5
When the user saves vitals for the patient "10108V420871" and "path"
“{“param” :
{“dfn”:“3”,“duz”:“10000000224”,“locIEN”:“67”,“vitals”:[{“fileIEN”:“1”,“reading”:“200/98”,“qualifiers”:[“23”,“59”,“100”]},{“fileIEN”:“3”,“reading”:“100.3”,“qualifiers”:[“47”,“50”]}]}
}” # features/F129_VitalSignsWriteBack.feature:6
Then a successful response is returned
features/steps/common_response_steps.rb:5
Then the response contains "{"success":true}"
features/steps/Medication_steps.rb:50
1 scenario (1 undefined)
3 steps (2 skipped, 1 undefined)
0m0.009s