Executing Karate feature file gives status code as '0' instead of '200'

I am using Karate framework version 0.9.3. In the karate framework, I just created one sample feature file which is giving me status code as '0' while executing instead of '200'.

Any help would be appreciated.

I have already tried to pass the base url from karate-config.js file as follows but no success:

function() {
     return {
             demoBaseUrl: 'http://www.google.com'
Feature: google test

  Background: demo
    * url 'http://www.google.com/'

  Scenario: search google
    When method get
    * print 'demo-response:', response
    Then status 200

Error Message: status code was: 0, expected: 200, response time: 0, url: null, response: null

1 answer