List Info

Thread: Order of Test Metods




Order of Test Metods
user name
2006-05-17 14:46:03
Hi everybody
I have problem for my recent tests. I needed to order them -
I saw how 
it is done in other tests.
The target TestCase is TestAccountInstallation. I created a
static 
method suite() and ordered there my methods
And than in IcqProtocolProviderSlick I changed the following
line :
    addTestSuite(TestAccountInstallation.class);
became
    addTest(TestAccountInstallation.suite());

But this way after registering the account and quering
services for 
protocol provider there is no result and tests fail with the
following 
reason :
    "No Protocol Provider was found for ICQ
UIN:......"

Any ideas what is wrong ?

Here is the source of the static suite method :

public static Test suite()
    {
        TestSuite suite = new TestSuite();
        suite.addTest(
            new 
TestProtocolProviderServiceIcqImpl("testRegisterUrongU
sername"));
        suite.addTest(
            new 
TestProtocolProviderServiceIcqImpl("testRegisterUrongP
assword"));
        suite.addTest(
            new
TestProtocolProviderServiceIcqImpl("testInstallAccount
"));

        return suite;
    }

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Order of Test Metods
user name
2006-05-17 15:49:05
Hello Damian,

In your suite() method.

> suite.addTest(
>             new
TestProtocolProviderServiceIcqImpl("testInstallAccount
"));

should be:

suite.addTest( new
TestAccountInstallation("testInstallAccount"));

I remember losing myself many frustrating hours over exactly
the same 
error once.

Cheers
Emil


Damian Minkov wrote:
> Hi everybody
> I have problem for my recent tests. I needed to order
them - I saw how 
> it is done in other tests.
> The target TestCase is TestAccountInstallation. I
created a static 
> method suite() and ordered there my methods
> And than in IcqProtocolProviderSlick I changed the
following line :
>     addTestSuite(TestAccountInstallation.class);
> became
>     addTest(TestAccountInstallation.suite());
> 
> But this way after registering the account and quering
services for 
> protocol provider there is no result and tests fail
with the following 
> reason :
>     "No Protocol Provider was found for ICQ
UIN:......"
> 
> Any ideas what is wrong ?
> 
> Here is the source of the static suite method :
> 
> public static Test suite()
>     {
>         TestSuite suite = new TestSuite();
>         suite.addTest(
>             new 
>
TestProtocolProviderServiceIcqImpl("testRegisterUrongU
sername"));
>         suite.addTest(
>             new 
>
TestProtocolProviderServiceIcqImpl("testRegisterUrongP
assword"));
>         suite.addTest(
>             new
TestProtocolProviderServiceIcqImpl("testInstallAccount
"));
> 
>         return suite;
>     }
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

Order of Test Metods
user name
2006-05-17 16:29:34
Yes my mistake. Really stupid copy-paste mistake .
thanks once again )

Emil Ivov wrote:
> Hello Damian,
>
> In your suite() method.
>
>> suite.addTest(
>>             new 
>>
TestProtocolProviderServiceIcqImpl("testInstallAccount
"));
>
> should be:
>
> suite.addTest( new
TestAccountInstallation("testInstallAccount"));
>
> I remember losing myself many frustrating hours over
exactly the same 
> error once.
>
> Cheers
> Emil
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )