[Libreoffice-qa] Converting a Python UI test into a cppunit test

Ilmari Lauhakangas ilmari.lauhakangas at libreoffice.org
Fri Jul 17 06:53:38 UTC 2020


Michael Stahl kirjoitti 16.7.2020 klo 20.43:
> On 16.07.20 18:55, Ilmari Lauhakangas wrote:
>> I created execute.sh for running the Python UI test:
>>
>> export PYTHONPATH=/home/tonttu/libreoffice/instdir/program/
>> export 
>> URE_BOOTSTRAP=file:///home/tonttu/libreoffice/instdir/program/fundamentalrc 
>>
>> export SAL_USE_VCLPLUGIN=gen
>> rm -rf /tmp/libreoffice/4
>> SRCDIR="${SRCDIR:-$(pwd)}"
>> python "$SRCDIR"/uitest/test_main.py --debug 
>> --soffice=path:"$SRCDIR"/instdir/program/soffice 
>> --userdir=file:///tmp/libreoffice/4 
>> --file="$SRCDIR"/sw/qa/uitest/writer_tests7/tdf127652.py
>>
>> I ran execute.sh while in the core directory and confirmed that the UI 
>> test failed.
> 
> why so complicated, try:
> 
> (cd sw && make -srj8 UITest_writer_tests7 
> UITEST_TEST_NAME="tdf127652.tdf127652.test_mark_delete_undo_delete_tdf127652") 

The script method allows to see the UI while the test is executed, but 
it would be good to have the example you quote documented in 
https://wiki.documentfoundation.org/Development/UITests#Running_the_test

Ilmari


More information about the Libreoffice-qa mailing list