manatlan / reqman

Reqman is a postman killer ;-)
GNU General Public License v2.0
59 stars 12 forks source link

Output json #8

Closed AngeloMateus closed 3 years ago

AngeloMateus commented 3 years ago

Sorry for leaving this here, but is there a way to output only the json response into a file? I've tried reqman --o users.yaml > ./output.json but this gives me all the reqman text in between the json output.

manatlan commented 3 years ago

Currently no ;-(

But I should find a way to output "tests results" in a "computer readable format" (json or yaml), to be able to post-process them in tools like jenkins or others ... easily. It's defenitvly in the pipe !

BUT ... BTW, reqman is, already, able to save "state results", in a "proprietary" format (.rmr) (see --s options).... (which is just a ZIP of pickable python objects). And in the ".rmr" file : there is all !!! (python objects for describings the tests, and the results) (everything needed to regenerate an html or replay a test from scratch).

for now, it should be pretty easy to code a python script which reads a rmr file, and transform as you want ;-)

but I'm currently not able to guarantee, that this rmr file is not subject to some little changes (but, at the beginning of the file, the 4 first octets, try to describe the version of the containing objects ("RMR1", "RMR2" ...) ... you can base your code on this, to be able to unpickle current contents. (see codes in reqman.py)

manatlan commented 3 years ago

@AngeloMateus ... in a near future, reqman will be able to output results with https://pypi.org/project/junit-xml/

AngeloMateus commented 3 years ago

Thanks @manatlan I'll keep an eye out!

manatlan commented 3 years ago

In the new release, V3 ... There are options to output results in a junit/XML output file format ... Which is computer readable easily