From: Anton T. <tm...@al...> - 2010-05-20 13:59:15
|
Hi! Thank you for your fast answer! As I said, I do run tests with true/false and the if statement is not even mentioned in the branches: Overview: code: So yes/No is working, but line 88 has line coverage but no branch coverage. I am understanding my question, but I don't understand what cobertura needs to branch in line 88 where there is not even a control structure... Regards, Anton Am 20.05.2010 um 15:39 schrieb Alejandro Pérez García: > Hi > > I'm sorry, but I thikn that I don't understand your question. > > If you want to cover the "else" sentence (the sentence you marked with "THIS LINE") you only have to do "false" the yesNo expresion. > > I don't understand where is the problem. > > Regards > > > > > 2010/5/20 Anton Trapp <tm...@al...> > Hi! > > How can I cover the 4 branches of: > > if (yesNo) { > verifyTrue(selenium.isTextPresent("secure page")); > } else { > verifyFalse(selenium.isTextPresent("secure page")); <-- THIS LINE??? > } > > Code coverage is 100%, this test is called multiple times (yes I do perform a code coverage of the tests, please do NOT ask why...) with yesNo both true and false. So how can I test the 4 branches in the function calls that I don't even see and why are there no function calls in the second line which is almost identical. > > I always thought that branches are only for control structures like if, ...? > > Anybody can help me? > > Thank you very much in advance! > > Regards, > Anton > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > -- > Alejandro Pérez García > Socio fundador de Autentia y www.adictosaltrabajo.com > (Formación, Consultoría, Desarrollo de sistemas transaccionales) > mailto:ale...@au... > Tel.: 655 99 11 75 > > Autentia Real Business Solutions S.L. > "Soporte a Desarrollo" > http://www.autentia.com > > > > Este mensaje, y en su caso cualquier fichero anexo al mismo, puede contener información confidencial y/o privilegiada, siendo para uso exclusivo del destinatario. Si Vd. no es el destinatario o lo ha recibido por error, por favor, informe inmediatamente al emisor y destrúyalo. Está estrictamente prohibido por la legislación vigente realizar sin autorización cualquier copia, revelación o distribución del contenido de este mensaje sin la autorización expresa del remitente. Las opiniones expresadas en este correo son las de su autor y no son, necesariamente, compartidas por Autentia Real Business Solutions S.L. > > This e-mail, and in the case of any file annexed to it, may contain confidential and/or privileged information, and it is exclusively for the use of the addresses of the message. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden by current legislation. The points of view expressed in this e-mail are solely those of the author and may not necessarily be from, or supported by, Autentia Real Business Solutions S.L. > |