Dan Price wrote:
On Wed 24 Jun 2009 at 10:50AM, Michal Pryc wrote:
       - Don't write scripts in bash in our gate.  It's POSIX sh, ksh,
         or python.
There are more scripts then just ldtp.sh written in bash as this is default shell in opensolaris, so changing this now will be a little tricky, but doable if this is the requirement.

I'm declaring it to be the gate policy in order to prevent language
sprawl.

*.py: I'm pretty unhappy that we built a very nice test infrastructure
which you are not using.  pkg5testcase should be able to supply a lot
of what you need or could be subclasses or extended to do what you
want.  It avoids things like hardcoding localhost:10000 everywhere,
provides logging, and would make all of your tests discoverable by
'run.py'.

The pkg5testcase is the unittest, while this part is automated test for the GUI only. I don't think we could integrate this easily to the pkg5testcase, as each of the test scripts is using specific to ldtp functions. The problem with testing GUI is that some user have to "click" "type into field" or do another action in the specific part of the application, which ldtp is doing automatically.
       - __author__ should be eliminated (and it isn't even spelled
         right in test_ipsgui_start.py)

Your tests are also unittest tests.  What pkg5testcase and friends
give you is an infrastructure for setting up repos and images with
contents and then tearing those down.  You subclass from it.  It is a
subclass of unittest.  You can bring in ldtp or whatever else as well.

How would you write this test, in your current framework:

        - Start pkg manager
        - Do an image-update (no effect, no changes available)
        - Add contents to the repository
        - Do an image-update (will work, new changes available).

Or:

        - Start pkg manager (depot is running)
        - Shut down depot
        - Try to do an image-update from the pkg manager, and
          test that it handles the error gracefully.
Dan,
Thanks for those comments it really make sense to drop the whole thing we had and simple use unittests. I have prepared very simple test case and I would like to hear if this is what you wanted?

http://cr.opensolaris.org/~migi/automated_tests_2_jul/

This is one very simple test case to start and stop PM using unittest & LDTP. Please note that second webrev for building LDTP is needed if you don't have it already.

To run this test:
./run.py -o TestPkgGuiStart*
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to