Need help in getting started with writing the integration test

Dileep Sankhla sankhla.dileep96 at gmail.com
Wed Jun 6 13:43:01 UTC 2018


I'm adding my test to autotests/parttest.cpp with a test function
PartTest::testTypewriterAnnotTool.
For the annotation toolbar, I have #include "../ui/pageviewannotator.h" and
doing this in the test function:

PageViewAnnotator pageviewannotator(part.m_pageView, part.m_document);
pageviewannotator.setEnabled( true );

But on make, I'm getting linking error as the undefined reference to
PageViewAnnotator::PageViewAnnotator(PageView*, Okular::Document*)

How to resolve this and check for the typewriter tool button in the toolbar?




On Wed, Jun 6, 2018 at 3:08 PM, Dileep Sankhla <sankhla.dileep96 at gmail.com>
wrote:

> Hello Tobias,
>
> Thank you so much for the detailed explanation. I got the overview of how
> tests are written and how they are currently organized.
>
> I have just begun to write the test for typewriter annotation tool and my
> first test case is "checking if the annotation toolbar has the typewriter
> tool button in it?"
>
> Till now I have been succeeded in opening the document data/file1.pdf with
> the current page as 0 by using the object of Okular::Part and now I'm not
> getting the way of showing the annotation toolbar and how will I check for
> the typewriter tool in it?
>
> Do I need to simulate <F6> keypress for showing the annotation toolbar and
> if yes, then how will I check for the specific tool in it?
>
> Need help.
>
> Thanks and Regards
> Dileep
>
>
>
>
> On Mon, Jun 4, 2018 at 1:19 AM, Tobias Deiminger <haxtibal at posteo.de>
> wrote:
>
>> Am 03.06.2018 21:39 schrieb Tobias Deiminger:
>>
>>> Am 03.06.2018 08:05 schrieb Dileep Sankhla:
>>>
>>
>> Ups, I misread the question
>>
>>> What will I compare here?
>>>>
>>>
>> as "what will compare here?"
>>
>> GUI tests compare with autotests/parttest.cpp.
>>> Core tests potentially compare with autotests/*annot*.cpp
>>> Afaikt there are no tests yet that check painting results pixel wise.
>>>
>>
>> New answer: You compare actual outcome with expected outcome. What actual
>> outcome and expected outcome means depends on your test case. You have to
>> define it.
>>
>> Tobias
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180606/3f153d2a/attachment.html>


More information about the Okular-devel mailing list