Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2016 up to now | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2007


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] Setup, dependencies and exception handling


  • Subject: Re: [QF-Test] Setup, dependencies and exception handling
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: 10 Jul 2007 14:21:02 +0200

Hi Louise,

dependencies in a 'Test-set' are not normally executed, they are there
to be inherited by the (direct or indirect) 'Test-case' child nodes
where all the Dependency resolution takes place.

However, in some cases you really need a dependency to be run first,
for example when it is used to setup parameters required by the
'Condition' of a 'Test-case', or - as in your case - if the Setup of a
'Test-set' depends on it. To that end, simply activate the Dependency
node's attribute 'Always execute, even in test-suite and test-set
nodes'.

By the way, I'd advise against mixing Dependency and Setup/Cleanup.
The latter are mostly retained for backwards compatibility. Though
Setup/Cleanup is more intuitive, Dependencies are fare more powerful.

This includes exception handling. Did you ever try to place a Catch
nodes in a Dependency? That way you can handle exceptions for all
Test-cases that are based on that Dependency. More generic exception
handlers can be placed in more generic, lower level dependencies etc.

Best regards,
    Greg



"Kelstrup, Louise" <louise.kelstrup@?.com> writes:

>    Hi
>
>
>
>    This dependency stuff is really hard to get right :-)
>
>
>
>    I have observed that parent dependencies are not executed if the child
>    contains a setup node. Is that correct behaviour?
>
>
>
>    Example
>
>
>
>    Testset GranParent
>
>      Dependency A
>
>      Testset Parent (inherits dependencies)
>
>          Setup B: Change data
>
>          Testcase C
>
>          Testcase D
>
>
>
>    I use dependency A to ensure that all preconditions are met (example
>    application started and mainwindow open). The Setup B node is used for
>    doing some steps that all testcases in the set starts with (instead of
>    repeating myself in every testcase). I would expect the execution of
>    testset Parent to ´start executing Dependency A before the setup node,
>    but the dependency is skipped.
>
>
>
>    I understand that it will work if I change the setup B to a
>    dependency, but I like to keep the distinction between preconditions
>    and steps that I want to be performed for every testcase.
>
>
>
>    I would like to hear comments on this.
>
>
>
>    By the way, does anyone have some good examples of how to implement
>    high-level exception handling in the script? I am trying to make my
>    script more exception resistent and would appreciate some inspiration.
>    Thank you.
>
>
>
>    Regards
>
>    Louise Kelstrup
>
>    Capgemini
>
>    Capgemini Danmark A/S, Registered office: Gentofte, Reg.No. 25606965
>
>
>
>    This message contains information that may be privileged or
>    confidential and is the property of the Capgemini Group. It is
>    intended only for the person to whom it is addressed. If you are not
>    the intended recipient, you are not authorized to read, print, retain,
>    copy, disseminate, distribute, or use this message or any part
>    thereof. If you receive this message in error, please notify the
>    sender immediately and delete all copies of this message.
> _______________________________________________
> qftest-list mailing list
> qftest-list@?.de
> http://www.qfs.de/mailman/listinfo/qftest-list

--
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876
GF: Gregor Schmid, Karlheinz Kellerer          HRB München 140833


Videos Downloads Documentation Buy Free Trial