Hi,
I know that verify commands will add the errors and continue running
the program and will throw the errors when the test exits. But the
assert commands will throw errors when it assertion fails. This will
lead to stop the current execution of the test method.
I have two test methods in my test class extending
"SeleneseTestCase" . In this testA have verify commands and testB has
assert commands. When i run the test class, testA always passes the
test. Any one say why the testA is not failing.
package com.test;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.SeleneseTestCase;
import junit.framework.Test;
import junit.framework.TestSuite;
public class MyTest3 extends SeleneseTestCase
{
public void setUp() throws Exception
{
selenium = new DefaultSelenium("localhost",
Integer.parseInt("4444"), "*chrome", "
http://localhost:8080/");
selenium.start();
}
public void testA() throws Exception
{
verifyTrue(false);
verifyTrue(true);
verifyFalse(false);
verifyFalse(true);
}
public void testB() throws Exception
{
assertTrue(false);
assertTrue(true);
assertFalse(false);
assertFalse(true);
}
public void tearDown() throws Exception
{
selenium.stop();
}
public static void main(String[] args)
{
junit.textui.TestRunner.run(suite());
}
public static Test suite()
{
return new TestSuite(MyTest3.class);
}
}