Verify asserts without stop tests

Jakub Raczek edited this page Dec 8, 2016 · 6 revisions

Our test framework supports Verify asserts methods, in case of failure by delegating asserts to Verify test will not be stop. Thanks to this all asserts from test can be verify and the result are presented at the test end.

Verify.That(
       this.DriverContext,
       () => Assert.AreEqual(5 + 7 + 2, forgotPassword.EnterEmail(5, 7, 2)),
       () => Assert.AreEqual("Your e-mail's been sent!", forgotPassword.ClickRetrievePassword));

You can set if screenshot will be taken or page source will be saved in case of failure of delegated assert (by default both are disabled).

Verify.That(this.DriverContext, () => Assert.IsFalse(flag), true, true);
Verify.That(
    this.DriverContext,
    true,
    false,
    () => Assert.AreEqual(5 + 7 + 2, forgotPassword.EnterEmail(5, 7, 2)),
    () => Assert.AreEqual("Your e-mail's been sent!", forgotPassword.ClickRetrievePassword));

Verify API

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.