Unable to get new Ranorex BDD Integration to work currently

Best practices, code snippets for common functionality, examples, and guidelines.
AdamH
Posts: 21
Joined: Thu Aug 08, 2013 9:20 am

Unable to get new Ranorex BDD Integration to work currently

Post by AdamH » Tue Apr 10, 2018 11:17 am

Hi,

Summary:
I've been following the new Ranorex support posting on how to integrate BDD style testing with Ranorex after creating a new .sdaddin file in Visual Studio 2017 using the supplied project, as described in the following post: https://www.ranorex.com/blog/how-to-use ... udio-links.

I've hit a glitch with the instructions as I not yet able to see the SpecFlow category in the 'New File' window [File->New->File] in my trial BDD Ranorex project.

Detailed Steps Taken / Things Tried:
1) I’ve followed the helpful instructions at https://www.ranorex.com/blog/how-to-use ... udio-links
2) I’ve created the required Visual Studio Project. Even though both Ranorex and Visual Studio 2017 are installed in the default locations I’ve tried both of the following just in case:
a. I’ve created the .sdaddin file using the automatically updated links to ICSharp.Core, ICShare.SharpDevelop, ICSharp.SharpDevelop.Dom
b. I’ve deleted the links in the Visual Studio project and added them back in manually to the required Ranorex DLL’s and created a new version of the .sdaddin file
c. NB: The file names look like they have changed slightly from the published instructions and the ones I can see are instead:
Step2_c_image.jpg
Step2_c_image.jpg (22.23 KiB) Viewed 389 times
d. I’ve tried creating a new Feature file using the steps below using both versions of the .sdaddin file that I’ve created
3) I’ve added the SpecFlow 1.9.0 NuGet package to my newly created Ranorex project; which includes adding SpecFlow via the ‘Manage Packages’ window
4) I’ve added in the link to MSTest in the app.config file
5) But when I try to add a new SpecFlow feature file all I currently see is the following window:
Step5_image.jpg
Step5_image.jpg (34.87 KiB) Viewed 389 times
6) When I watch the video on the Ranorex support page I see the following window instead:
Step6_image.jpg
Step6_image.jpg (37.54 KiB) Viewed 389 times
7) The SpecFlow addin has been added to the following directory:

8) I’ve attached a copy of the .sdaddin fle that I’ve generated using the automatically updated links (as per the Ranorex instructions) to this email
9) I’ve attached a copy of my Ranorex solution, TrialBDD.zip

Hopefully I've just missed a simple step out somewhere as it would really good to get this working.
Many thanks...

AdamH
Posts: 21
Joined: Thu Aug 08, 2013 9:20 am

Re: Unable to get new Ranorex BDD Integration to work currently

Post by AdamH » Tue Apr 10, 2018 11:28 am

Part 2:
I wasn't able to upload the final screenshot and files in the original posting (it was only allowing me to add three files strangely) so I'm adding the remaining ones here...

Step 7 Screenshot:
Step7_image.jpg
Step7_image.jpg (87.5 KiB) Viewed 388 times
Step 8 .sdaddin file:
TechTalk.SpecFlow.RanorexIntegration.zip
(4.23 MiB) Downloaded 27 times
Step 9 TrialBDD project file:
This one is 10MB in size and thus I can't upload it directly to the forum. What's the best way of uploading this one please?

Additional System Information:
Ranorex 8.0.1
Windows 10 Enterprise (64bit) - Version 1703
16GB Ram

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unable to get new Ranorex BDD Integration to work currently

Post by Support Team » Fri Apr 13, 2018 11:04 am

Hi,

I guess you just missed to unpack the *.sdaddin:

Instruction Video

Hope this helps.

Sincerely,
Robert
.
Image

AdamH
Posts: 21
Joined: Thu Aug 08, 2013 9:20 am

Re: Unable to get new Ranorex BDD Integration to work currently

Post by AdamH » Thu Apr 19, 2018 12:42 pm

Hi,

Many thanks for that.
Yes I did miss that step as I misread the blog post section talking about extracting the .saddin file to the specified directory. I took that as simply copying the file to the new directory as the popular archiver "WinRAR" did not consider it an archive file and thus no files were found to actually extract. When I tried "7-zip" instead (as shown in your helpful video) that worked as hoped. I was then able to define feature files, etc. in my project.

I think it might be worth adding a couple of clarifications to the blog post to highlight this step; including the use of a archiver (for instance 7-zip) that will actually treat the .saaddin file as an archive.

I haven't been able to get my tests to run yet using MSTest but I'll cover that in another reply.

Thanks

AdamH
Posts: 21
Joined: Thu Aug 08, 2013 9:20 am

Re: Unable to get new Ranorex BDD Integration to work currently

Post by AdamH » Thu Apr 19, 2018 12:57 pm

Not yet able to run BDD tests using MSTest.exe


I've been following your blog post covering the new way of carrying out BDD testing with Ranorex; https://www.ranorex.com/blog/how-to-use ... udio-links; as covered in my entries above for this posting. At this point when I try executing the tests using MSTest.exe I get the following error message:

Code: Select all

C:\Users\<username>\Documents\Ranorex\RanorexStudio Projects\BDDTrial\BDDTrial\bin\Debug>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\MSTest.exe" /testcontainer:BDDTrial.dll /resultsfile:C:TestResults.trx
Microsoft (R) Test Execution Command Line Tool Version 15.0.27019.1
Copyright (c) Microsoft Corporation. All rights reserved.

Loading BDDTrial.dll...
Starting execution...
No tests to execute.
Detailed Information:

In addition to the information in the blog post I've found I needed to carry out the following steps:
1) Install NUnit via the NuGet package manager in Visual Studio 2017
2) Added a reference in the Ranorex solution to the dll
NUnit FrameworkC:\Users\<username>\.nuget\packages\nunit.framework\2.63.0\lib

Then the project will build. Otherwise after editing the automatically generated feature file I get errors about missing the NUnit reference.

I changed the Ranorex solution settings and enabled "Runtime -> Copy runtime to output" via the top menu bar of Ranorex studio.
At this point I get errors regarding missing Ranorex .dlls.
Ranorex.core_errorMessage.jpg
Ranorex.core_errorMessage.jpg (23.84 KiB) Viewed 334 times
If I then copy all *Ranorex*.dll's from the \Runtime sub-folder to the main \Debug folder I get a different error message in MSTest:
Loading BDDTrial.dll...
Starting execution...
No tests to execute.

Can you please let me know whatever steps I've missed out in following the blog post to get this version of BDD to work with Ranorex please.
Many thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unable to get new Ranorex BDD Integration to work currently

Post by Support Team » Tue Apr 24, 2018 10:27 am

Hi Adam,
If I then copy all *Ranorex*.dll's from the \Runtime sub-folder to the main \Debug folder I get a different error message in MSTest:
Yes, the Ranorex DLLs have to be inside the same folder as the YourTest.dll itself.
Loading BDDTrial.dll...
Starting execution...
No tests to execute.
There seems to be everything OK from the prerequisites and test execution side. Did you actually create a *.feature file and have you specified a test scenario as mentioned in the blog?

Sincerely,
Robert
.
Image

ja3ynt
Posts: 6
Joined: Thu Jun 07, 2018 6:20 am

Re: Unable to get new Ranorex BDD Integration to work currently

Post by ja3ynt » Thu Jun 28, 2018 6:21 am

Hi Adam,
Please keep the Project and Feature file name same for your project