This blog accompanies our BDD SpecFlow training course. It takes you step by step through installing Pickles and configuring reports in Pickles UI.

Step 1 – Install Chocolatey

Install Chocolatey

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

  • Open a command prompt as an Administrator, paste in the link and hit enter
  • After a few seconds, chocolatey should be installed
  • Check it has been installed by entering: choco

Choco

Step 2 – Install Pickles UI

  • Now enter: choco install picklesui

PicklesUI Install

  • You should receive a message telling you that the installation of PicklesUI was successful
  • Now we can launch PicklesUI

Step 3 – Configuring PicklesUI

  • Enter into the Command Prompt: picklesui
  • This should then open PicklesUI (This may take a few seconds if it is your first time using PicklesUI)

PicklesUI

  • Now to get PicklesUI to generate reports for us we must first run our tests from the command line as when we run our tests using the NUnit3 Console Runner. This will create an NUnit3 Results file, which is called TestResults.xml by default, in order to get this result:

Test Results

  • Now we can go ahead and modify PicklesUI to generate reports for us:

PicklesUI Setup

  • Feature Directory – paste the file path to your feature files
  • Output Directory – paste the file path to a results directory you want your generated reports to go to
  • Create Directory For Each Output Format – On (optional)
  • Project Name – The name given to your reports
  • Project Version – The version given to your reports
  • Include Test Results – On
  • Test Results Format – Nunit3 (Ensure it is NUnit3 and not just NUnit)
  • Gherkin Language – English (dependent on your native language)

NOTE: Finally on the right hand side you can turn on, whichever format of report you want to be generated, Html, Word, DHtml etc. (In the above example, I have turned on Html, Word and DHtml)

  • And finally click Generate

Step 4 – View Results

  • Once PicklesUI has finished generating the reports, they should now be available in your Output Directory (See previous step):

Results Output

  • Now you will want to navigate inside one of your reports folders and open the index.html file
  • This is an example of a DHtml(Dynamic HTML) report:

DHtml

  • If you click Show Overview in the top right of the page, this will give you an overview of your tests, in a user friendly format:

Overview

 

For more information regarding BDD, please see our: