unickq/SpecFlow.Selenium.Plugin

define the saucelabs job name for a scenario

Artyom-ARS opened this issue · 7 comments

In the original repository there are an opportunity to add job name and test status.
Could you please add the same according to the issue baseclass/Contrib.SpecFlow.Selenium.NUnit#7

Hi @Artyom-ARS

Test status worked for SauceLabs. Look at SauceLabsWebDriver.cs UpdateTestResult()
If API was changed - I can make an update or accept pull request with it.

For job name you should you saucelabs.name param in app.config

Thank you for the answer. Is it possible to set saucelabs.name value to assembly version automatically or by code hook?

I guess it possible, but not with this plugin. You can write your own ps script for upgrading assembly version :)

Perhaps my question wasn't clear enough. I'm not asking how to change assembly version. The question is how to use assembly version as value for job name?

You can't do it programmatically. All WebDriver config are set from app.config during the SpecFlows CS files generation.
You can try to write a PowerShell script which can read AssemblyVersion and replace saucelabs.name in App.config. Script could be executed as MsBuilt task

Maybe later I can introduce several variables for task you've asked for setting names, projects, etc.
Now I have @@debug key for browserstack.build which replaces build with DateTime.Now()

Thank you. Will do it with PowerShell.