Referencing the Model in the Test Case

Since your Test Cases and Software Models reside in different projects you need to make sure that the test cases "are aware" that the model exists. That means you need to reference the model in your test case projects.

To add a reference to your model perform the following steps:

  • In your Test Case Project right click on the References node and select Add Reference.. from the context menu

  • Tick your software version project and press the OK button

  • Tick your software version project and press the OK button

As the last step you will need to add the model reference in your test case class as follows:

  • Before the namespace name add the reference to the model: using MyFirstSoftware_Model;

  • Before the [SetupTest] add a new property: private MyFirstSoftwareApp App { get; set; }

  • In the [SetupTest] method instantiate your SW model: App = new MyFirstSoftwareApp(t);

After the above mentioned modification your test case will look as follows:

using System;
//we are referencing the SW Model
using MyFirstSoftware_Model;
using Progile.ATE.Common;
using Progile.ATE.TestFramework;

namespace TC001_Rev1
    public class MyFirstTestCase
        //we are setting a new App property
        private MyFirstSoftwareApp App { get; set; }
        public bool Setup(ITester t)
            //we are instantiating the SW model
            App = new MyFirstSoftwareApp(t);
            return true;

        public void PreconditionStep(ITester t)
            if (t.Testee.FindImage(TestImages.TC001_Rev1.Images.TopMenu.Home).HasSucceeded)
                t.Report.PassStep("The home page is displayed in the WebBrowser");
                t.Report.FailStep("The home page is not displayed in the WebBrowser");
        //We define the Test Input and the Expected Results in the tag before the method
            TestInput = "Click on the Contact Us link in the top of the screen",
            ExpectedResults = "The Contact Us page is displayed")]
        public void Step1(ITester t)
            //we are clicking on the Contact Us item in the Top Menu

            //we are checking if the Contact Us page has been displayed
                t.Report.PassStep("The Contact Us page is displayed");
                t.Report.FailStep("The Contact Us page is not displayed");


Last updated