[Cosmo-dev] New functional tests and test cleanup

Mikeal Rogers mikeal at osafoundation.org
Thu Jan 25 10:33:59 PST 2007


>  At the basic I would atleast
> like to create user objects/accounts for all the new test cases  
> using a
> single line.
>
> +
> +
> +SERVER_URL = 'http://qacosmo.osafoundation.org:8080'
> +ADMIN_USER = 'root'
> +ADMIN_PASS = 'cosmo'
> +
> it would be great if we could move this to a common configuration
> file..I know it has already been implemented, but a script to  
> change all
> the test suite scripts should be possible (instead of manually moving
> this).

Eventually I'll write a little script that can override module  
defaults for every module, so if you wanted to change the url or  
adminuser/adminpass you could do that more easily. This will become  
more of an issue once we expand the tests, right now all the old  
modules have been moved in to only 3 test modules and 1 new one is  
there for CMP.

>
> +TEST_USER = 'test_user_report%s' % str(random.random()).replace('.',
> '')
> +TEST_PASS = 'test_pass'
> +TEST_FIRST_NAME = 'Test'
> +TEST_LAST_NAME = 'User'
> +TEST_EMAIL = TEST_USER+'@osafoundation.org'
>
> again it would be great to have just a simple way of creating a user
> instead of declaring these many variables. (just one variable shud  
> auto
> populate the other variables)

Those declarations aren't for an existing user, they are for the name  
and options of the user that will be created at the beginning of the  
test module (and removed at the end), and each test module creates a  
different user. Since I use a fairly large random number at the end  
of each test user it's doubtful that we will ever hit a conflict with  
an existing user, so I don't know of a situation where you would need  
to change the defaults.

-Mikeal



More information about the cosmo-dev mailing list