BDD intergration with SOATest - The provided user does not have permission to modify this resource.
I use soaTest 9.9 without Virtualize.
i tried a simple step to write a file using cucumber and SoaTest.
my feature File has below steps:
Feature: Integrate parasoft SoaTest with Cucumber
Scenario: BDD Test
Given I am user 12212
below is json step defn.
"stepdefs": [
{
"step": "Given",
"pattern": "^I am user (.*)$",
"args": 1,
"actions": [
"copy:/parabank.cucumber/parabank_stepdefs.tst/Test Suite/Test Steps/Write File"
]
below is error im getting on console.
cucumber.runtime.CucumberException: The provided user does not have permission to modify this resource.
at com.parasoft.cucumber.soatest.StepDefinitionLoader.lambda$new$1(StepDefinitionLoader.java:106)
at cucumber.runtime.java.Java8HookDefinition$1.call(Java8HookDefinition.java:53)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.java.Java8HookDefinition.execute(Java8HookDefinition.java:47)
....
I was asked to use -Dsoatest.user=admin -Dsoatest.password=password while launching JUNIT. still no luck, I just like to know how to configure the server to deactivate this password authentication to proceed further.
Comments
-
I was asked to use -Dsoatest.user=admin -Dsoatest.password=password while launching JUNIT. still no luck
You have to use a valid login. Users and access levels are configured in Parasoft CTP.
I just like to know how to configure the server to deactivate this password authentication to proceed further.
The connection to Parasoft CTP is configured in the preferences for your SOAtest server.
0 -
Actually, I'm getting 403 - my SOATest is not having appropriate license to implement this.
actual error for invalid creds in 401- "You are not authorized to use this API. Please provide a valid user name and password at the top of the page." il update my license and try again, Thank you so much0 -
what are the license required for implementing the BDD approach with soaTest please?
0 -
"Server API Enabled" license.
0 -
Now I have acquired the license and implemented a simple test. below is the JSON file that im using.
{ "runner": { "server": "http://localhost:9080", "executionSuite": { "parent": "/BDDPocJSON", "name": "parabank_stepdefs.tst", "variables": [ { "name": "SWAGGER", "value": "http://localhost:8080/parabank/services/bank/swagger.yaml" }, { "name": "BASEURL", "value": "http://localhost:8080/parabank/services/bank" } ] }, "assets": [ { "path": "parabank_stepdefs~~~~.tst", "parent": "/BDDPocJSON" } ] }, "stepdefs": [ { "step": "Given", "pattern": "^I am user (.*)$", "args": 1, "actions": [ "copy:/BDDPocJSON/parabank_stepdefs.tst/Sample1/CustomWrite" ] } ] }
when I run a feature file, what ever resource I mentioned in "Asset" tag gets deleted and im getting below error.
java.lang.NullPointerException
at javax.activation.URLDataSource.getContentType(URLDataSource.java:78)
at com.parasoft.api.rest.client.internal.MultiPartWebResourceFactory.invoke(MultiPartWebResourceFactory.java:126)
at com.sun.proxy.$Proxy34.filesUpload(Unknown Source)
at com.parasoft.cucumber.soatest.StepDefinitionLoader.uploadAssets(StepDefinitionLoader.java:261)
at com.parasoft.cucumber.soatest.StepDefinitionLoader.lambda$new$0(StepDefinitionLoader.java:99)
at cucumber.runtime.java.Java8HookDefinition$1.call(Java8HookDefinition.java:53)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.java.Java8HookDefinition.execute(Java8HookDefinition.java:47)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:202)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)cucumber.runtime.CucumberException: None of the specified resources are valid. Check that they are correct and still exist.
at com.parasoft.cucumber.soatest.StepDefinitionLoader.lambda$new$1(StepDefinitionLoader.java:106)
at cucumber.runtime.java.Java8HookDefinition$1.call(Java8HookDefinition.java:53)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.java.Java8HookDefinition.execute(Java8HookDefinition.java:47)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:206)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:46)please let me know why the resource files are deleted and im getting this error
0 -
The "NullPointerException" is a bad error message. It happens when trying to upload an asset that doesn't exist. Perhaps your ""parabank_stepdefs~~~~.tst" does not exist, for example. It should live as a resource in your java project, next to your step defs json file.
0