loadero / loadero-java

Loadero Java client for managing tests and launching runs via Java API
GNU General Public License v3.0
1 stars 0 forks source link

When reading a test resource, the response always has a script field with null value #47

Open Avengess opened 1 month ago

Avengess commented 1 month ago

When executing, for example, Test.read() (though I know at least Test.create() also triggers this when parsing the response after creation) returns a response with a script field that has no value. The GET TEST endpoint for the Loadero API does not return a script field, which I presume explains why it is null. Likely this field should not be returned in the response at all.

Example code for triggering the issue:

public static void main(String[] args) throws IOException {
    Loadero.init("{token}", {projectID});

    Test test = Test.read({testID});
}

Response: 2024-08-28 16:59:22.895 [main] INFO - tp.CustomResponseHandler.handleResponse(CustomResponseHandler.java:56) - Successful - GET - Test{id=1622574, created='2024-08-27T06:15:04Z', updated='2024-08-27T06:15:04Z', projectId=[CENSORED], name='Test 1', scriptFileId=[CENSORED], script=null, startInterval=PT10S, participantTimeout=PT6M, mode=load, incrementStrategy=random, groupCount=0, participantCount=2} - https://api.loadero.com/v2/projects/[CENSORED]

ajpetersons commented 1 month ago

I'm going to say this is expected, as long as there is no exception being thrown. To access the content of the script you should use File.read method