authorjapps / authorjapps/zerocode

Feature Request -Parameterization of file name in Step

Open
#521 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1k
Forks
453
Avg merge
7d 2h
Merged PRs (30d)
5

Description

**Description** :
In order to execute performance tests, json has to be sent in the body request.
There are more than 1000 json files that has to be used in the performance testing.
Each file contains different data. File name consists of <> format

We created custom java function that will scan the directory for list of files and parse the uuid so that it can be used in the testing scenario

**Challenge**:
Zerocode step does not allow parameterization of file names
For example, in below request, 40000000000000000123456789ABCDEF cannot be parameterize

**Benefits**:
Adding this feature will allow execution of performance test using zerocode framework for the given scenario

**Sample Steps:**

//Generate geid by parsing list of files in directory
name: get_geid
url: ListFilesExecutor
operation: getListOfGeid
assertions:
geid: $IS.NOTNULL
body: $IS.NOTNULL

// Use geid to post the request header and body file
name: post_endpoint
url: /client
method: POST
request:
headers:
uuid: ${$.get_geid.response.geid}
body: ${JSON.FILE:reusableContent/request/**40000000000000000123456789ABCDEF**-client.json} **//Unable to parameterize this step, refer expected value below**
verify:
status: 200

**Expected step with parameterization so that correct json file is added in the body based in geid**
name: post_endpoint
url: /client
method: POST
request:
headers:
uuid: ${$.get_geid.response.geid}
body: ${JSON.FILE:reusableContent/request/**${$.get_geid.response.geid}**-client.json} **
verify:
status: 200

If there is any workaround available until this feature is implemented, please let us know.

Contributor guide

Open the contributing guide

Research direction

Start by locating the implementation that resolves JSON.FILE body paths and the expression handling for values such as ${$.get_geid.response.geid}. Reproduce the get_geid and post_endpoint sample steps, then verify that the resolved geid selects the matching request JSON file and that the POST still returns status 200.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, json
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.