Patch Set 3:

> > osmo_interact_vty.py --gen-xml-ref
 > 
 > That's cool, didn't know about it. Is there example use somewhere
 > in osmo*?

I thought I had one somewhere, but it appears not actually ... I wanted to 
change the osmo-gsm-manuals README over to this, but it appears I haven't done 
it. I thought the py scripts / cmdline help had examples, but again appears I 
forgot to write that.

Here are two quick examples:

  osmo_interact_vty.py -r 'osmo-hlr -c /n/s/cn_test/nitb/osmo-hlr.cfg -l 
/tmp/hlr.db' -p 4258 --gen-xml-ref

and if the app is already running just

  osmo_interact_vty.py -p 4258 --gen-xml-ref


 > Also, is there equivalent counterpart for osmotestvty.py?

There are osmo_verify_transcript_vty.py (and also 
osmo_verify_transcript_ctrl.py) which allow writing VTY/CTRL tests basically 
from a live session's screen dump. See for example osmo-hlr/tests/*.vty and 
*.ctrl.

There are some more complex tests especially in OsmoBSC, which start/stop 
programs and do stuff that is not simply a VTY transcript, but it is possible 
to import osmo_interact_vty.py and use that API to write the same kind of 
complex tests. Personally, I think I will mostly do transcript tests from now 
on, because it is infinitely less effort than writing py code around it. Note 
that the verify_transcript_* also allow updating your current transcript file 
with any changed output the program may exhibit, after which you can git diff 
them, which makes updating the tests to new behavior quite convenient... (I am 
dreaming about offering a combined transcript type that offers issuing CTRL and 
VTY commands in the same transcript, but not sure if that will happen any time 
soon.)

And, anything to say about this question?:

"I am still asking myself why you want to make the py2 scripts py3 compatible 
in the first place, and would welcome if you could answer this question I've 
raised a couple times now."

-- 
To view, visit https://gerrit.osmocom.org/5038
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121
Gerrit-PatchSet: 3
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max <msur...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msur...@sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pes...@sysmocom.de>
Gerrit-HasComments: No

Reply via email to