Click or drag to resize
Blackbaud UAT Quick Start

Learn to quickly create a Blackbaud CRM GUI test suite using the Blackbaud UAT SDK.

Prerequisites
  • Visual Studio 2013 Community

  • NuGet Plugin

  • SpecFlow Pugin

Note Note

You can find details on how to install these at Visual Studio , NuGet and SpecFlow

Creating a Blackbaud UAT Test Project.
  1. Create a new Unit Test Project.

    File | New | Project | Unit Test Project

    New Project wizard
    NewBSProject
  2. Add the Blackbaud UAT SpecFlow Plugin and Blackbaud UAT Core Classes packages to your project.

    Right-click on your solution in the solution explorer and choose Manage NuGet Packages for solution

    Package manager wizard
    AddBSNu Get Packages
    Note Note

    The Blackbaud UAT packages will normally be available from the public nuget.org package repository. If you have stand alone nupkg files you can add their location as a package source in the nuget settings.

  3. Add target Environment Urls to your app.config.

    Example appSettings section
    <appSettings>
    
      <add key="BBCRMBaseUrl" value="https://blackbaudDemo.com/bbappfx" />
      <add key="BBCRMHomeUrl" value="/webui/webshellpage.aspx?databasename=BBInfinity" />
      <add key="Credentials" value="user:password" />
    
      ....
    
    </appSettings>
  4. Add a new SpecFlow feature file.

    New Item wizard
    AddAFeature File
  5. Populate your feature file.

    Example Feature File
    Feature: Constituent Search
      In order to manage Constituent Records
      As a Blackbaud CRM user
      I want to search existing Constituent records
    
    Scenario: Quick Constituent Search
      Given I have logged into the BBCRM home page
      And I have opened the constituent search dialog
      When I search for "Hampton"
      Then The results should contain "Hampton Street Elementary School"
  6. Generate a step file.

    Right-Click on the feature file and choose Generate Step Definitions

    Step File wizard
    Generate Steps
  7. Populate the Steps.

    Example Steps File
    using System;
    using Blackbaud.UAT.Base;
    using Blackbaud.UAT.Core.Base;
    using TechTalk.SpecFlow;
    using System.Collections.Generic;
    
    namespace Blue_101
    {
        [Binding]
        public class ConstituentSearchSteps
        {
            [Given(@"I have logged into the BBCRM home page")]
            public void GivenIHaveLoggedIntoTheBBCRMHomePage()
            {
                BBCRMHomePage.Login();
            }
    
            [Given(@"I have opened the constituent search dialog")]
            public void GivenIHaveOpenedTheConstituentSearchDialog()
            {
                BBCRMHomePage.OpenConstituentsFA();
                ConstituentsFunctionalArea.OpenConstituentSearchDialog();
            }
    
            [When(@"I search for ""(.*)""")]
            public void WhenISearchFor(string name)
            {
                SearchDialog.SetLastNameToSearch(name);
                SearchDialog.Search();
            }
    
            [Then(@"The results should contain ""(.*)""")]
            public void ThenTheResultsShouldContain(string result)
            {
                SearchDialog.CheckConstituentSearchResultsContain(result);
            }
        }
    }
  8. Ensure ChromeDriver is on your path.

    Note Note
    Adding it to your project and setting it copy to Output Directory property it to Copy always is one way to ensure this.
    Caution note Caution
    At the moment you will need to manually download the latest ChromeDriver, copy it to your project's directory, and add it as an existing item to your project. Future versions of Specflow.Blackbaud.UAT intend to have ChromeDriver included in the NuGet package.
    Caution note Caution
    If you are getting a Dictionary Key error for the Driver, then you may need to delete your WebDriver project reference. You will then need to create a new WebDriver reference by browsing to "packages\Blackbaud.SpecFlow.Selenium.UAT[version here]\lib\net40\WebDriver.dll" and adding this reference. This additional step should be resolved with future versions of ChromeDriver.
  9. Build and Run your tests.

    For example using the Visual Studio Test Explorer
    Constituent Search Results
See Also

Other Resources