I am trying to get going with BDD testing using the Ranorex blog post https://www.ranorex.com/blog/how-to-use ... d-process/
First issue was with a "tools version" in the downloaded SpecFlow (https://github.com/ranorex/bdd-specflow) project: "The tools version 12.0 is unrecognized. Available tools versions are 2.0, 3.0, 4.0."
- By looking into other posts in this forum, I solved that one by changing the tools version in the project file to 4.0
Now, I need to target it to .Net 3.5 (according to the blog post). But I am seemingly not allowed to change the .Net version in any of my Ranorex Solutions anymore (running on 10.1, .Net 4., even though I have several other .Net versions installed. Also, in the latest push to GitHub, it seems like the code has been made .Net 4.6.2 compliant (comment to latest push: "Pushed to .NET 4.6.2 and removed "copy local" from Ranorex assemblies").
I have .Net 4.6.2, but is no longer allowed to chose it in Ranorex Stuido project options (see attached screen dump).
Anyone know how to "downgrade" .Net for a project in 10.1?
All help is highly appreciated!
How to get going with the BDD blog post
How to get going with the BDD blog post
You do not have the required permissions to view the files attached to this post.
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
I went a little ahead despite the .Net issue:
Now trying to acieve this one (from the blog post): "Add the NuGet package for NUnit.Runners.2.7.1, it is important that you use version 2.7.1". How do I achieve that one? When searching for NUnit.Runners in the package manager I get: Is it the NUnit.Runners.Net4 (I guess not, as that one is not on v2.7.1 yet)?
Then SpecFlow.NUnit.Runners? I do get an error: Child dependencies of dependency only packages cannot mix external and project packages". And how do I ensure version 2.7.1?
Appreciate any help I get get to make this work!
Now trying to acieve this one (from the blog post): "Add the NuGet package for NUnit.Runners.2.7.1, it is important that you use version 2.7.1". How do I achieve that one? When searching for NUnit.Runners in the package manager I get: Is it the NUnit.Runners.Net4 (I guess not, as that one is not on v2.7.1 yet)?
Then SpecFlow.NUnit.Runners? I do get an error: Child dependencies of dependency only packages cannot mix external and project packages". And how do I ensure version 2.7.1?
Appreciate any help I get get to make this work!
You do not have the required permissions to view the files attached to this post.
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
Hi,
I've just consulted the blog post with Ranorex folks and according to them, it should be OK using the newest .Net and Nunit package. Aside of the old version numbers, the article should be still valid
I've just consulted the blog post with Ranorex folks and according to them, it should be OK using the newest .Net and Nunit package. Aside of the old version numbers, the article should be still valid
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How to get going with the BDD blog post
Great. Thanks much.
Now, to the next issue (I manage to figure out the NUnit.Runners issue):
When building, I do get the following build error:
Do the wizard has a solution to that one as well?
Now, to the next issue (I manage to figure out the NUnit.Runners issue):
When building, I do get the following build error:
But when checking the package folder, the mentioned file is there. I have tried to restore and to remove/add the package. Same issue.C:\Users\bobo\OneDrive - Lessor A S\Desktop\bdd-specflow-master\IdeIntegration\RanorexIntegration\TechTalk.SpecFlow.RanorexIntegration.csproj(303,5) : Error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\packages\MSBuildTasks.1.5.0.235\build\MSBuildTasks.targets.
Do the wizard has a solution to that one as well?
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
Finally I found out...:
- Set tools version to 4.0 in all project-files in the downloaded repository
- Build each project (in the right order) in order to generate the DLLs being referred to in the RanorexIntegration project.
- Set tools version to 4.0 in all project-files in the downloaded repository
- Build each project (in the right order) in order to generate the DLLs being referred to in the RanorexIntegration project.
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
Now starting to create a BDD-enabled project in Ranorex according to the blog post:
I guess both shall be installed with latest version instead of the version mentioned in the blog post (like for the previous builds). But both install result in the error 'The attribute "CopyToOutputDirectory" in element <none> is unrecognized': Any idea about how to get around this?Install-Package SpecFlow.NUnit
Install-Package NUnit.Runners
You do not have the required permissions to view the files attached to this post.
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
Hi,
There are some problems in the BDD integration guide. Please follow these Jacob's comments and eventually fix the integration:
There are some problems in the BDD integration guide. Please follow these Jacob's comments and eventually fix the integration:
Code: Select all
Under the "Make your Ranorex Solution BDD ready" there is a code block with some NuGet code snippets. The first line is correct, but the second needs to be updated. Currently the snippet shows:
Install-Package SpecFlow.NUnit -Version 2.3.2
Install-Package NUnit.Runners.2.7.1
And this should be changed to:
Install-Package SpecFlow.NUnit -Version 2.3.2
Install-Package NUnit.Runners -Version 2.7.1
The next issue I've found is in the same section. The second C# segment says to add <probing privatePath="Runtime"/>in the assemblyBinding section. In the text (between the code snippets), the first double quote is backwards, so anyone that copies and pastes is going to run into an error. It also omits the need to add the assemblyBindingsection (which isn't there by default). The full code segment that needs to be inserted into app.config should be:
<assemblyBinding>
<probing privatePath="Runtime"/>
</assemblyBinding>
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How to get going with the BDD blog post
Thanks much, Pavel.... again!
I managed to install the packages and create a Ranorex Solution for trying out a Feature file. I can build the solution in Studio. But when trying to run it using the command line in the blog post I get the following error:
Any suggestions?
I think I will go back to creating the SpecFlow stuff and try to add the NUnit.Runners in version 2.7.1 using the command line I learned when setting up the test solution. But honestly, I have no idea if that is related to the error.
I managed to install the packages and create a Ranorex Solution for trying out a Feature file. I can build the solution in Studio. But when trying to run it using the command line in the blog post I get the following error:
I wonder if I am back again to .Net versioning problems? When building the SpecFlow DLLs in Ranorex Studio, the only available choice is .Net 4.8. Same .Net is used for the test solution. Also, I could not select version of the NUnit.Runners package in the package manager, so that one is the latest one. The .Net 3.5 is enabled on my Windows machine (but do not appear in the add/Remove programs). Also, I am wondering why it mention Windows NT when I am on Windows 10 (but that could be due to the old .NEt 3.5?).C:\Users\bobo\BDD\bddTrial\BDD2\BDD2\bin\Debug>..\..\..\.\packages\NUnit.Runners.2.7.1\tools\nunit-console-x86.exe BDD2.dll
NUnit-Console version 2.7.1.0
Copyright (C) 2002-2014, 2018 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 6.2.9200.0
CLR Version: 2.0.50727.9151 ( Net 3.5 )
ProcessModel: Default DomainUsage: Single
Execution Runtime: net-3.5
Could not load file or assembly 'Ranorex.Core, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a' or one of its dependencies. The system cannot find the file specified.
Any suggestions?
I think I will go back to creating the SpecFlow stuff and try to add the NUnit.Runners in version 2.7.1 using the command line I learned when setting up the test solution. But honestly, I have no idea if that is related to the error.
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
...and just an additional thought: Do I need to change the tools version in the project files to 3.4 instead of 4.0 (from the 12.0 in the downloaded files)...
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
I made progress... Setting local copy for the Ranorex.Core package...thanks to this post: could-not-load-file-or-assembly-ranorex ... 13906.html
(Also, I changed to tools version 3.5 and changed to the 2.7.1 version of NUnit.Runners in the SpecFlow project)
Now to the next problem when running the test
What a journey..... any idea about how to fix this one?
(Also, I changed to tools version 3.5 and changed to the 2.7.1 version of NUnit.Runners in the SpecFlow project)
Now to the next problem when running the test
I guess they key is "...unsupported version of the nunit.framework, 3.0.5797.27534". That is indeed the version of the NUnit.Framework package being referenced in the project after adding the two packages mentioned in the blog post:C:\Users\bobo\BDD\bddTrial\BDD2\BDD2\bin\Debug>..\..\..\.\packages\NUnit.Runners.2.7.1\tools\nunit-console-x86.exe BDD2.dll
NUnit-Console version 2.7.1.0
Copyright (C) 2002-2014, 2018 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 6.2.9200.0
CLR Version: 2.0.50727.9151 ( Net 3.5 )
ProcessModel: Default DomainUsage: Single
Execution Runtime: net-3.5
Unhandled Exception:
NUnit.Core.UnsupportedFrameworkException: Skipped loading assembly BDD2 because it references an unsupported version of the nunit.framework, 3.0.5797.27534
Server stack trace:
at NUnit.Core.Builders.TestAssemblyBuilder.GetCandidateFixtureTypes(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.GetFixtures(Assembly assembly, String ns)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites, Boolean checkCompatibility)
at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites, Boolean checkCompatibility)
at NUnit.Core.TestSuiteBuilder.BuildSingleAssembly(TestPackage package)
at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
at NUnit.Core.SimpleTestRunner.Load(TestPackage package)
at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
at NUnit.Core.RemoteTestRunner.Load(TestPackage package)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
What a journey..... any idea about how to fix this one?
You do not have the required permissions to view the files attached to this post.
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
I give up on this.... Tried to start all over..... Cannot even build the Ideintegration project in the first project...
I'll call the support to see if they want to make this work.... otherwise will look for another platform for BDD.
The files are there, both for .Net 3.5 and 4.0. Ranorex seems to enforce .Net 4.0 in the CSPROJ files, but the reference in the project is for 3.5... what a mess...Error loading code-completion information for Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL from Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL:
Could not find assembly file.
I'll call the support to see if they want to make this work.... otherwise will look for another platform for BDD.
Best Regards
Bo
Bo
Re: How to get going with the BDD blog post
Hi,
I think your best hope here is to contact directly support about this. A very few people is actually using BDD with Ranorex. It's simply not worth the effort
I think your best hope here is to contact directly support about this. A very few people is actually using BDD with Ranorex. It's simply not worth the effort
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How to get going with the BDD blog post
Well, I don't know if we will be successful with our BDD implementation. Time will show. But the business people have started doing Gerkin to specify stories, and I do need to implement some setup to "catch" and use that information, Ranorex or not. Given those circumstances, I definitively would prefer to use Ranorex, both because we know it already, but also to utilize the recording modules and repositories we already have.
Moving to a "native" BDD implementation with coded tests, no repository, no recording modules, does not look very attractive to me. So, even though we loose some of the benefits of Ranorex when doing BDD, I think Ranorex still has a lot to give compared to native implementations. Also, I don't think BDD is relevant for all types of stories/tests, so introducing another framework would result in us to maintain two parallel frameworks, which I really would like to avoid.
But obviously, if there is no working BDD solution for Ranorex, I will have to implement an alternative framework (let me know if you know a good one ).
Moving to a "native" BDD implementation with coded tests, no repository, no recording modules, does not look very attractive to me. So, even though we loose some of the benefits of Ranorex when doing BDD, I think Ranorex still has a lot to give compared to native implementations. Also, I don't think BDD is relevant for all types of stories/tests, so introducing another framework would result in us to maintain two parallel frameworks, which I really would like to avoid.
But obviously, if there is no working BDD solution for Ranorex, I will have to implement an alternative framework (let me know if you know a good one ).
Best Regards
Bo
Bo