Using LISA REST Step, where to POST File URI path to take the Mar File path from the File system, Body parameter and Data Type is java.io.InputStream.
see my sample scripts here
how can I execute deploymar via curl
Hi, in your examples what is the syntax for executing the File command on windows to use a mar file?
curl -F "file=@filepath/filename"
in windows this is c:\path\to\file.ext
Looking for a solution with LISA rest step if so , otherwise I can create an idea.
sorry, do not understand.. do you mean in Java?
I mean, using LISA REST Test Step.
ah.. sorry, haven't used Lisa Test yet
sdetweil2 - your question about the LISA REST Step but your not using it for Test Automation? What are you using it for?
Where are you getting to this "LISA REST Step"? Want to help but unsure of what you're trying to accomplish.
that wasn't me, that was @Praba_kn.
he wanted to use REST API to control Lisa Test.
I am successfully using REST apis to load and control services (add/start/stop/remove) on VSE's
Ah ha thank you! Sorry for that. Mis-read the thread. REST API for LISA TEST is Arif_Muhammad
I want to use LISA REST Step to upload a file(basically deploy a mar file). Is there a way to achieve in current LISA REST Step.
could you explain a little more.. I provided some scripts using the REST API that can upload a MAR file. but you use words 'LISA REST step', so I am not sure what you mean..
Use Multipart MIME Step and HTTP/HTML step to deploy a mar file by invoking REST API.
It make sense to me. Let me try, thanks for helping.
Thanks Nandeesh it worked for me.
Can you share the Test, pls
Please find screen shot.
I am doing a similar thing at my end. But I am trying to upload a csv file and there are several other data sent as a POST API payload. But I do not know how and where to add the payload in the HTTP/HTML step. I tried to add them as separate POST parameters but I keep getting a 500 error response. I have analysed the POST API call by manually doing the upload and recording using Chrome-POSTMAN. Any help would be appreciated. Thanks!!
file content is not a 'post' parameter.. you have to go to the Mime multi-part form process Mime Specifications to inject the data.
either YOU have to generate the headers and separators, or some DT function has to do that..
there is a hard coded send file, as mentioned above, but I consider that to be fairly useless for a flexible service.
I have tried above option but getting error in HTTP step as below. Could anyone please help me?
| Trapped Exception: Connection reset by peer: socket write error | Trapped Message: java.net.SocketException: Connection reset by peer: socket write
Were you able to resolve your issue. As when is tried the same procedure as stated in the thread, I am not able to deploy the file . The step error's out. Kindly help.
Because this thread is so old and contains so many comments, is it possible for you to add a new question stating what you are trying to do, the issue or error you are having, and the version of DevTest you are using?
Thanks Joel. I was able to resolve the issue by writing a Java script.
Retrieving data ...