You will need to add the step dependencies in your projects. The following actions will have to be performed on your new Visual Studio Solution:
You will first have to add our enterprise nuget repository: The user/password for accessing these artifacts will be provided to you with your enterprise license
Two components will be available: StepApi, containing the API and StepDev, containing a local runner for unit testing your keywords
Deployment of your keyword library and dependencies can be done by dropping the file(s) int the gui:
The “dependencies libraries” field allows you to add the additional dlls needed by you keyword. It can be a single DLL file or a zip file containing the multiple DLLs
You can add the .pdb of your keyword DLL in the “dependencies libraries” field, by putting it directly in the filed or by adding it to the zip file
You can unit test your new keywords using the NUnit package. This will save you time as you will be able to debug your keywords without having to build and deploy your DLL to the controller.
To do that, you will first have to install the NUnit nugget dependencies (as described in this section). This will allow you to use [Test] annotated functions.
In order to have the most realistic test, you should use the ScriptRunner object which will simulate the execution of your keywords like step does. See the following example for more information.
The following .NET class is a simple example of two keywords using the Selenium driver. This demonstrate the usage of the basic API functions:
First, the new keywords are defined using the [Keyword] annotation
The getDriver and initDriver functions show the usage of a session. session.get and session.get allows to pass .NET objects during the live cycle of your virtual user. The Webdriver is typical of the usage of the session, as this driver contains the state of the user and have to be unique per virtual user. Note that we are using a wrapper class for the Driver so that the browser will be properly closed
The gotoGoogle function shows how to pass input values from the test plan to your keywords using input.GetValue
The testKeywords functions shows how to unit test your keywords using the ScriptRunner object