I have set my system environments (Bearer authentication) for Xray Cloud:
(Yes, i have set them on the pipeline environmental variables)
export XRAY_API_BASE_URL= "https://xray.cloud.getxray.app"
export XRAY_CLIENT_ID=
export XRAY_CLIENT_SECRET=
Using the command "- behave -f allure_behave.formatter:AllureFormatter -o report/allure/results -f pretty --f xray ./features/" I am running the test
And on the Feature file I have added the Test execution at the top followed by test case if for the scenario
Feature file:
@jira.test_execution('TEST-xxx')
Feature: feature name
Background: Common Steps
Given xxx
@jira.testcase('TEST-xxxx')
Scenario: Scenario name
On the pipeline I get below error -
HTTPError: Could not post to JIRA service https://xray.cloud.getxray.app/. Response status code: 404
Exception JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/behave", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/behave/main.py", line 183, in main
return run_behave(config)
File "/usr/local/lib/python3.10/site-packages/behave/main.py", line 127, in run_behave
failed = runner.run()
File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 804, in run
return self.run_with_paths()
File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 824, in run_with_paths
return self.run_model()
File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 626, in run_model
failed = feature.run(self)
File "/usr/local/lib/python3.10/site-packages/behave/model.py", line 350, in run
formatter.eof()
File "/usr/local/lib/python3.10/site-packages/behave_xray/formatter.py", line 127, in eof
self.xray_publisher.publish(self.test_execution.as_dict())
File "/usr/local/lib/python3.10/site-packages/behave_xray/xray_publisher.py", line 51, in publish
result = self.publish_xray_results(self.endpoint_url, self.auth, test_execution)
File "/usr/local/lib/python3.10/site-packages/behave_xray/xray_publisher.py", line 45, in publish_xray_results
_logger.error('Response error: %s', response.json())
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I have set my system environments (Bearer authentication) for Xray Cloud:
(Yes, i have set them on the pipeline environmental variables)
export XRAY_API_BASE_URL= "https://xray.cloud.getxray.app"
export XRAY_CLIENT_ID=
export XRAY_CLIENT_SECRET=
Using the command "- behave -f allure_behave.formatter:AllureFormatter -o report/allure/results -f pretty --f xray ./features/" I am running the test
And on the Feature file I have added the Test execution at the top followed by test case if for the scenario
Feature file:
@jira.test_execution('TEST-xxx')
Feature: feature name
Background: Common Steps
Given xxx
@jira.testcase('TEST-xxxx')
Scenario: Scenario name
On the pipeline I get below error -
HTTPError: Could not post to JIRA service https://xray.cloud.getxray.app/. Response status code: 404
Exception JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/behave", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/behave/main.py", line 183, in main
return run_behave(config)
File "/usr/local/lib/python3.10/site-packages/behave/main.py", line 127, in run_behave
failed = runner.run()
File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 804, in run
return self.run_with_paths()
File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 824, in run_with_paths
return self.run_model()
File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 626, in run_model
failed = feature.run(self)
File "/usr/local/lib/python3.10/site-packages/behave/model.py", line 350, in run
formatter.eof()
File "/usr/local/lib/python3.10/site-packages/behave_xray/formatter.py", line 127, in eof
self.xray_publisher.publish(self.test_execution.as_dict())
File "/usr/local/lib/python3.10/site-packages/behave_xray/xray_publisher.py", line 51, in publish
result = self.publish_xray_results(self.endpoint_url, self.auth, test_execution)
File "/usr/local/lib/python3.10/site-packages/behave_xray/xray_publisher.py", line 45, in publish_xray_results
_logger.error('Response error: %s', response.json())
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)