parse the vm guest ip address list and connect to guest winappdriver to execute winapptest.py on remote guest
python2.7 must be installed as prerequisition
x86 | x86_64 |
---|---|
PyQt4 | PyQt4 |
PyWin32 | PyWin32 |
Finally Windows download VCForPython27.msi and install
- Download get_pip.py from https://bootstrap.pypa.io/pip/2.7/get-pip.py, then
python2.7 get-pip.py
- Install related PIP packages
pip install Twisted==20.3.0
pip install pyOpenSSL==20.0.0
pip install qt4reactor==1.6
pip install service-identity==21.1.0
pip install rsa==4.5
pip install pyasn1==0.4.8
pip install attrs==20.3.0
pip install wheel==0.37.1
yum install python-qt4
pip install Appium-Python-Client==0.3
pip install Twisted==20.3.0
pip install pyOpenSSL==20.0.0
pip install qt4reactor==1.6
pip install service-identity==21.1.0
pip install rsa==4.5
pip install pyasn1==0.4.8
pip install attrs==20.3.0
pip install wheel==0.37.1
Get and install rdpy from https://github.com/citronneur/rdpy:
git clone https://github.com/citronneur/rdpy.git rdpy
Apply the mouse move patch to the rdpy:
git am 0001-Added-auto-mouse-move-to-avoid-stop-connection.patch
python rdpy/setup.py install
- Copy the generated vm_ip.txt to the same directory as vmtestrun.py, and also the winapptest.py, put the test app xml in the same directory,
- run vmtestrun.py it will parse the vm_ip.txt, and connect the ip address in the txt and run the winapptest with the xml files in the same directory
- vm_ip.txt will be generated by findip.txt after you create the VMs
- for linux, Xvfb needs to be installed and configured first
yum install Xvfb
nohup Xvfb -ac :7 -screen 0 1280x1024x8 > /dev/null 2>&1 &
export DISPLAY=:7
- Test with VNC connection
python2.7 vmtestrun.py -p 1234 -c VNC -f vm_ip.txt
- Test vm with RDP connection
python2.7 vmtestrun.py -u administrator -p 1234 -c RDP -f vm_ip.txt