Migrating CodedUI Test to Robotframework for Testing Sharepoint 2019 Websolution

just one sample migrating ATDD Test from Coded UI to Robotframework.

Before Test Structure:

CodedUI Unit Test Structure

Comparison Unit Test & ATDD Test Structure:

Structure Comparison C# and Python with Selenium API

Reason for Migration from CodedUI to Robotframework:

  1. CodedUI is now deprecated.
  2. Test Tools and Ways of testing didn’t fullfill the requirement for doing ATDD test (E2E test) scopes.
  3. Long test run .
  4. Needs of proper test logging
  5. Test run should be independance from SW build.
  6. Only IE as browser is supported.

Proposed Robotframework ATDD Structure:

Robotframework ATDD Structure

Project / Test & Development enviroment Limitation:

  1. Test Object: Sharepoint 2019 customisation
  2. OS used for test object and testing: Microsoft Windows 10 OS
  3. Build and test requrement tools: Microsoft TFS
  4. Diffrent targets and build environment for: Development, Integration and Preproduction.

Needed Infrastukture and Software for Testing with Robotframework:

  1. Python 3.x
  2. Robotframework
  3. Robotframework SeleniumLibrary
  4. Robotframework Whitelibrary
  5. Test editor Notepad ++ with Robotframework plugin
  6. Test should be able to run as Selenium Hub trigger from MS TFS which consuming Robotframework xUnit reports as test run results.

Benefit of using Robotframework:

  1. Test run faster than CodedUI
  2. Test cases are written as Keyword Driven test, instead of Unit Test, these speed up the test cases creation and migration also simplify reusable of test cases.
  3. No need using Visual Studio for creating test sases, you can use simple text editor r write tests.
  4. Test results are more understandable for non-technical team members ( Test Manager, Project Manager, Environment Team, Solution Team)
  5. Using RF Tag functionally and RF Report (Rebot) custom report can be created without any additional effort,
  6. Report implementations of build on TFS over Xunit report flag on Robot runner.
  7. Tests can run independently outside build tool.

Starting the MIgration Steps:

  1. Separating & creating all needed sharepoint UI keywords in UI Keyword resources.
  2. Separating & creating all needed sharepoint 2019 application workflow as Keyword resources.
  3. Creating template of sharepoint masterpage sites mapping as keyword resources.
  4. Defining needed static and dynamic variables regarding to TCs and target test enviroment as variable resources
  5. Creating RF runner files as batchfile for each target deployment enviroment (development, integration, or regresion)
  6. Creating test suites regarding requirement (sanity test, fuctional test or regresion test)
  7. Creating folder structure to map sharepoint functional requirement implementation
  8. Creating folder structure for test reports, test suites and test runner.
  9. Tagging related test suites regarding requirement coverage

Reports & Logs:

Iscorama 1060

Lensa ini sebenarnya dipakai untuk memprojeksikan slide atau film yang di ambil dengan Iscorama 54. Dengan lensa ini saya dapat memprojektsikan Slide Panorama dengan Kodak SA-V Projektor.

Iscorama 54 Anamorph

Iscorama 54 adalah anamorphot lensa yang paling sering saya gunakan, untuk melakukan pemotretan panorama malam.

Perbedaan yang paling mendasar adalah bahwa iscorama mempunyai single focus, jadi anda cukup melakukan focus di iscorama saja, tidak perlu di lensa kamera(setting di lensa kamera di set ke infinity.

Hal ini tentu saja memudahkan pengambilan gambar dibandingkan dengan multifokus system seperti pada Anamorph lensa lainnya seperti Kowa B&H dimana anda harus memfokus di lensa dan di anamorph adapter untuk pengambilan gambar.

Atau memakai diopter di depan lensa anamorph, untuk bisa single fokus ( Rangfinder / Rapido) yang berarti ukuran lensa dan assesori anda bertambah panjang dan semangkin sulit untuk mengambil gambar dengan mudah tanpa “rig”!

Kamera dan lensa yang saya gunakan:

  1. Nikon D50 dengan lensa 35mm /f2 AFD
  2. Nikon D850 dengan lensa 50mm /f1.8 AIs

Iscorama 54 mempunyai bayonet depan sebesar 95mm untuk filter, dan bayonet belakang sebesar 77mm, saya kebetulan mendapat beberapa original adapter dari 77mm ke 55mm, jadi cukup di adaptasikan dengan filter adapter 55-52mm lens optik untuk mennyatukan lensa ini dengan lensa kamera.

Dengan Iscorama 54 ruang pandang lensa anda menjadi lebih lebar dengan faktor 1,5 X

Contohnya : untuk lensa 50mm menjadi seperti lensa (50mm : 1,5=) 33,33 mm.

Untuk mendapatkan Format sebenarnya anda mendapat perbandingan sisi gambar tidak lagi 2:3 untuk FF format tetapi 4:9

Dengan kamera modern anda, dapat juga mengambil gambar video dengan format (4:9) seperti di film film bioskop.

Lensa dengan focal terpendek yang dapat anda pakai adalah 50mm untuk FF dengan Iscorama 54, dan lensa lain seperti 85mm , 135mm, 200mm sepanjang filter depan lensa tidak lebih besar dari 52mm / karena lensa belakang Iscorama 54 adalah 54 mm.

Beberapa contoh gambar dengan Lensa 50mm / f1.8 AIs dan nikon D850:

Foto pada pengambilan gambar (dengan Komprimasi)
Foto setelah gambar dirubah ke format panorama

Beberapa gambar contoh dalam format panorama:

Untuk setting dan contoh hasil foto di DX format silahkan lihat di sini.Untuk setting dan contoh hasil foto di FX format silahkan lihat di sini.

Opsi yang menarik adalah pembuatan video Anamorph dengan panorama format seperti film di bioskop. Dengan D850 misalnya anda dapat menggunakan Software Handbrake untuk dekompriminasi format ke format panorama kembali.

Ini Setting yang saya pakai untuk mengkomprimasi balik film atau video kebentuk panorama.

Upgrade Raspbian Stretch to Buster

Check your current OS version:

uname -a

cat /etc/debian_version


Get up to date.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Verify nothing is wrong. Verify no errors are reported after each command. Fix as required (you’re on your own here!).

dpkg -C
apt-mark showhold

Optionally upgrade the firmware.

sudo rpi-update  

Prepare apt-get

Update the sources to apt-get. This replaces “stretch” with “buster” in the repository locations giving apt-get access to the new version’s binaries.

sudo sed -i 's/stretch/buster/g’ /etc/apt/sources.list    
sudo sed -i 's/stretch/buster/g’  /etc/apt/sources.list.d/raspi.list 

Verify this caught them all. Run the following, expecting no output. If the command returns anything having previously run the sed commands above, it means more files may need tweaking. Run the sed command for each.

grep -lnr stretch /etc/apt  

Speed up subsequent steps by removing the list change package.

sudo apt-get remove apt-listchanges

Do the Upgrade

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y

cleanup old outdate packages.

sudo apt-get autoremove -y && sudo apt-get autoclean

Verify with:

cat /etc/os-release.

Update Firmware

You have come this far, might as well get the latest firmware:

sudo rpi-update    

Have fun with your new updated Pi! 😉

Installing Ride on Pi Zero

Installing Ride v1.7.4 on Raspberry Pi Zero with Raspbian is a Challenge, especially during preperation and installation of wxPython for pi Zero

Base setup from pi Zero:

  • Rasbian buster lite
  • python 3.7x

Do SW update before installing :

sudo apt-get update
sudo apt-get upgrade
sudo apt get dist-upgrade

Do Install pip3 for my pi zero:

sudo apt-get install python3-pip

Prepare installation before installing wxPython on pi Zero:

sudo apt-get install dpkg-dev build-essential swig python-dev libwebkit-dev libjpeg-dev libtiff-dev checkinstall freeglut3 freeglut3-dev libgtk2.0-dev  libsdl1.2-dev libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev libgconf2-dev libglapi-mesa libosmesa6 libglu1-mesa-dev libglu1-mesa mesa-common-dev
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev
sudo apt-get install python3.7-dev
sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev

sudo apt-get install gtk+-3.0 gtk+3.0-dev
sudo pip3 install pathlib2

Now install wxPython, it can take long (+/- 24 Hours) by pi Zero!

sudo pip3 install wxPython

If it’t passed you can install Ride !

sudo pip3 install --upgrade robotframework-ride

You can start the Ride now as remote sessions:

Ride.py &

Raspberry Pi & Robotframework

Raspberry Zero W connected directly to Mac with OTG mode

Why using Robotframework on Raspberry pi?

As Raspberry pi user , sometimes I have problems after doing OS update with some application I currently workout on pi, mean do “sudo apt-get update” , “sudo apt-get upgrade” & do “Reboot” everythings goes Wrong 🙁 !.

I have been using Robotframework since 2006, and would like to show you how simple to run a Regresion Test with Robotframework Framework on SBC like Rasberry Pi and Co’s. Robotframe work need only python ecosystem, which are out of the box delivered by Raspbian OS. And also it needs minimal resource of space in SD card.

As a sample I will start with installation of Robotframework , please check before if you have python pip installer installed on your Rasbian before starting with the installation!

Start Installation of Robotframework on Pi

sudo apt-get install python3-pip
sudo pip3 install robotframework
Installation run OK

Check Robotframework runner:

robot --version

Robotframework runner OK

You can used nano or Test IDE Ride for writing Tests .

Installing Robotframework-RIDE test IDE:

sudo pip3 install robotframework-ride

Start RIDE on Mac with ssh conection to pi:

ride.py & 

Running Robotframework-RIDE for testing Temperature Sensore Interface on Pi

now you can start writing your Test, please refer to Robotframework manual for more Information.

Let check the SD card used for Robotframework Installation, just 1% from 16 GB SD card!

Used pi space after Robotframework Installation

Wish you happy Testing and Try Out!

Testing Soap interface with Robotframework Library

For efficient testing sometime you need to created automaticaly request xml feeding soap interface. If you are familiar with robot framework, it’s great. Robotframework has already 2 external Library, which handle SOAP interfaces communication.( Süds Library or Zeep Library ) .

There are a lot of opinion in Internet about these two libraries, discussing pro and contra using one of these lib. for testing SOAP.

Important things to do, you have to find out which library can handle “your WSDL“ better!

For my task, Suds library does.

How to find it out?

Just run your SOAP Library keyword pointing out your target WSDL .

Used “Create Soap Client” keyword for testing the binding if you get all the entities and objects on your WSDL, If the answed “OK” than you can used your Library for SOAP,

Ports (1):
Methods (10):
addToIndex(xs:string guid, )
getProductMetadaten(xs:string guid, )
getProductMetadatenGuidList(xs:string query, )

Types (62):

If not you have to find out other library for interfacing with SOAP.

As sample I got these error using Zeep for parsing my WSDL:

self.item_type = self.item_type.resolve()
AttributeError: ‘lxml.etree.QName’ object has no attribute ‘resolve’

These error are related to these following open issue on Zeep:

Sample of created XML request from RF with Suds Library:

XML Request Created with RF & SUD from input WSDL

this is how I wrote it in Robotframework Test Suite:

map WSDL local
Run Keyword and Continue On Failure setProductMetadaten

this is how I wrote it in Robotframework Test Case:

show object setProductMetadaten

calling internal keyword:

${object}= Create WSDL Object n2:ProductMetadata
Set Wsdl Object Attribut ${object.commonMetadata} identifier ${dummy_text}
Set Wsdl Object Attribut ${object.commonMetadata} title ${dummy_text}
Set Wsdl Object Attribut ${object.commonMetadata.description} summary ${dummy_text}
Set Wsdl Object Attribut ${object.commonMetadata.description} comments ${dummy_text}
Set Wsdl Object Attribut ${object.commonMetadata.product} type ${dummy_text}
Set Wsdl Object Attribut ${object.commonMetadata.product} subtype ${dummy_text}
Set Wsdl Object Attribut ${object.commonMetadata} rflAuftragsnummer ${dummy_text}
Set Wsdl Object Attribut ${object.commonMetadata.change} version ${dummy_text}
${result}= call Soap method setProductMetadaten ${object}

RFlog result

RFlog result

Creating 100X Request with RF For loop keyword

map WSDL local
:FOR ${i} IN RANGE 100

Hope these infos help you starting your SOAP request creation with Robotframework & SudsLibrary, just another way of SOAP testing than using SOAPUI.

Custom PB4 (shorted)

Below PB4 adalah assesori nikon yang saya gunakan untuk pemotretan macro atau pemandangan.
Kelebihan dari below ini dibandingkan dengan below nikon yang lain adalah kemampuan untuk shift serta tilt, sehingga anda dapat mengatur DOF sesuai yang anda inginkan dalam komposisi gambar anda. Ini adalah solusi saya sebelum ada lensa Tilt & Shift dari Nikon.

Below ini di perpendek sampai scala 10 cm dari ukuran asalnya untuk mempermudah handling pemotretan.

lensa ini biasanya saya pakai dengan lensa:

  • Below Tessar 50mm/2,8
  • Enlager Lens EL Nikkor APO 135mm/5,6
  • Olympus Zuiko Auto1:1 80mm/4

Dengan PS4 sebagai Slide Copy

Modifikasi lebih lanjut untuk dipakai dengan digital kamera silahkan dilihat disini