Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically Extract information from Testingborad

Johan van Marion
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2025

For our Robot framework Automation i want to: 
from our project (e.g. PRJ)
extract gherkin test steps from the testing board.
The test-case is created with cucumber steps and dataset. (PRJ-001)
The test-case is executed in a execution (PRJ-002)

I'm trying to do this with API and/or GraphQL, but no success as so far... 
My question is it possible? 
The reason is that we want to have 1 source of information (which is XRAY) for creating test-cases.
I can access the Test-cases and i can access the Test-Executions and get the information
the problem is that when using a dataset linked to cucumber in the testingboard there will be more test-cases/ examples/ iterations which i cannot retrieve.

3 answers

0 votes
Johan van Marion
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2025

Finally got it. Pulling : 
Project ID with : 

query GetProjectId($projectKey: String!) {
getProjectSettings(projectIdOrKey: $projectKey) {
projectId
}
}

With this project ID, i can pull the test keys from the repository: 

query GetTests($projectId: String!, $path: String!) {
getTests(
projectId: $projectId,
folder: { path: $path, includeDescendants: false },
limit: 50
) {
results {
issueId
testType {
name
}
jira(fields: ["key"]) # This is the correct way to request Jira fields
}
}
}

Next is getting the individual test-details with : 
query GetTestDetails($testKey: String!) {
getTests(jql: $testKey, limit: 1) {
results {
jira(fields: ["key", "summary"])
gherkin
testType {
name
}
steps {
id
data
action
result
}
dataset {
parameters {
name
type
}
rows {
order
Values
}
}
}
}
}

Mixing it all together with a little python script and now i'm able to convert the Test-cases (only Cucumber and Manual by the way, as generic is not supported from the cloud with API/GraphQL)

So i've managed to answer my question.

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2025

HI @Johan van Marion 

Welcome to the community.

Best advice I can give is to contact Xray support on your requirement and see if this is possible.

 

0 votes
Johan van Marion
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2025

Sample Test-case: 
dataset.pngTest-case.pngTest-case_execute-in.pngTest-execution.pngTestingboard.png

Johan van Marion
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2025

Above are extra screenshot on what i want in my scripting to retrieve and how it gets there... 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events