Actions

icon Post
text/html Subscribe
text/html Unsubscribe

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

Re: [qmtest] Questions [context scope, prerequisites enforcement]


  • To: Mohamed Barwani <mohamedb@xxxxxxx>
  • Subject: Re: [qmtest] Questions [context scope, prerequisites enforcement]
  • From: Stefan Seefeld <stefan@xxxxxxxxxxxxxxxx>
  • Date: Thu, 10 Apr 2008 14:54:47 -0400

Hi Mohamed,

Mohamed Barwani wrote:
Hello there..

_1_
Am trying to get my head around python.. Looking at the context variable I can easily create new items it in a 'resource' object, but not in a 'test' object.

All context variables live in the Context object, which is passed to Resource.SetUp() as well as Test.Run(), where you can access as well as modify them.

(see http://www.codesourcery.com/public/qmtest/qmtest-snapshot/share/doc/qmtest/html/tutorial/concepts-context.html )

Scenario, test_b depends on test_a. test_a sets a context variable so test_b can use. Can't seem to get this working? Am I missing something.

QMTest provides only a weak dependency between tests: By registering 'prerequisite' tests you can instruct QMTest that a dependent test shouldn't be run if a prerequisite failed (for example). However, you can still invoke the dependent test only, and it will run happily even without the prerequisite test being executed first. This is a mere optimization that allows to skip tests if it is clear that they aren't even expected to pass if a prerequisite test failed, too.

(see http://www.codesourcery.com/public/qmtest/qmtest-snapshot/share/doc/qmtest/html/tutorial/concepts.html#concepts-tests)

For real dependencies you may use a Resource instead.

(see http://www.codesourcery.com/public/qmtest/qmtest-snapshot/share/doc/qmtest/html/tutorial/concepts.html#concepts-tests)

_2_
Does prerequisites get enforced at run time? i.e. test_b has a prerequisite test_a. If you run test_b does test_a get run?

No. However, resources that a test depends on, will.

Other than that.. well done!! QMTest seems like a great tool.

Thanks !

Regards,
		Stefan

--
Stefan Seefeld
CodeSourcery
stefan@xxxxxxxxxxxxxxxx
(650) 331-3385 x718