Why the same method are called more than one time?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why the same method are called more than one time?

Matheus Fontinele
I'm using a suite XML and for each tag test that I use, On the results are presented that my second and third test are executed more than one time.

I read many pages talking about this problem and I cannot fix it.

That's my suite XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="suite" >
    <test name="Login Incorreto" preserve-order="true" >
    <parameter name="login" value="80512345"></parameter>
    <parameter name="senha" value="password"></parameter>
    <parameter name="tipoAssert" value="FAIL"></parameter>
        <classes>
            <class name="br.com.cabal.test.LoginTest" />
        </classes>
       
    </test>
    <test name="Login Correto">
    <parameter name="login" value="8050000183"></parameter>
    <parameter name="senha" value="password"></parameter>
    <parameter name="tipoAssert" value="OK"></parameter>
        <classes>
            <class name="br.com.cabal.test.LoginTest" />
        </classes>
    </test>
    <test name="Senha Incorreta">
    <parameter name="login" value="8050000183"></parameter>
    <parameter name="senha" value="password"></parameter>
    <parameter name="tipoAssert" value="FAIL"></parameter>
        <classes>
            <class name="br.com.cabal.test.LoginTest" />
        </classes>
    </test>
</suite>


And below a print with the result contents:

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Why the same method are called more than one time?

XuQing Tan
hi Math

do you see the same issue if running with cli? ('mvn test' or 'gradle test')


On Monday, March 26, 2018 at 12:08:31 PM UTC-7, Matheus Fontinele wrote:
I'm using a suite XML and for each tag test that I use, On the results are presented that my second and third test are executed more than one time.

I read many pages talking about this problem and I cannot fix it.

That's my suite XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "<a href="http://testng.org/testng-1.0.dtd" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftestng.org%2Ftestng-1.0.dtd\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFHihXzQ1YlwcxcDehnw97TuniFLA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftestng.org%2Ftestng-1.0.dtd\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFHihXzQ1YlwcxcDehnw97TuniFLA&#39;;return true;">http://testng.org/testng-1.0.dtd" >

<suite name="suite" >
    <test name="Login Incorreto" preserve-order="true" >
    <parameter name="login" value="80512345"></parameter>
    <parameter name="senha" value="password"></parameter>
    <parameter name="tipoAssert" value="FAIL"></parameter>
        <classes>
            <class name="br.com.cabal.test.LoginTest" />
        </classes>
       
    </test>
    <test name="Login Correto">
    <parameter name="login" value="8050000183"></parameter>
    <parameter name="senha" value="password"></parameter>
    <parameter name="tipoAssert" value="OK"></parameter>
        <classes>
            <class name="br.com.cabal.test.LoginTest" />
        </classes>
    </test>
    <test name="Senha Incorreta">
    <parameter name="login" value="8050000183"></parameter>
    <parameter name="senha" value="password"></parameter>
    <parameter name="tipoAssert" value="FAIL"></parameter>
        <classes>
            <class name="br.com.cabal.test.LoginTest" />
        </classes>
    </test>
</suite>


And below a print with the result contents:

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.