Coder Social home page Coder Social logo

baseclass / contrib.specflow.selenium.nunit Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 13.0 759 KB

Test class generator to drive automated web ui tests with Selenium and SpecFlow

Home Page: http://www.nuget.org/packages/Baseclass.Contrib.SpecFlow.Selenium.NUnit/

C# 20.89% ASP 0.05% JavaScript 79.06%

contrib.specflow.selenium.nunit's People

Contributors

romerod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

contrib.specflow.selenium.nunit's Issues

Intergration with TFS build.

I am having some trouble with this project / autofac when trying to run from TFS build (2010) using nunit. I have tried a number of path options, but I see continue to see the same behaviour. the relevent error in the build log is:

ProcessModel: Default DomainUsage: Multiple Execution Runtime: net-3.5 .F.F.F.F.F.F.F.F Tests run: 8, Errors: 0, Failures: 8, Inconclusive: 0, Time: 0.4253568 seconds Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0 Errors and Failures: 1) SetUp Error : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature SetUp : System.Configuration.ConfigurationErrorsException : The type 'OpenQA.Selenium.Remote.RemoteWebDriver, Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin' could not be found. It may require assembly qualification, e.g. "MyType, MyAssembly". at Autofac.Configuration.ConfigurationRegistrar.LoadType(String typeName, Assembly defaultAssembly) at Autofac.Configuration.ConfigurationRegistrar.RegisterConfiguredComponents(ContainerBuilder builder, SectionHandler configurationSection) at Autofac.Configuration.ConfigurationRegistrar.RegisterConfigurationSection(ContainerBuilder builder, SectionHandler configurationSection) at Autofac.Configuration.Core.ConfigurationModule.Load(ContainerBuilder builder) at Autofac.Module.Configure(IComponentRegistry componentRegistry) at Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean excludeDefaultModules) at Autofac.ContainerBuilder.Build(ContainerBuildOptions options) at RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.FeatureSetup() in c:\Builds\1\Testing\RegistrationForm - Nightly - Main\Sources\Testing\RegistrationForm\Main\RegistrationForm.Tests.Acceptance\Features\UserRegistration.feature.cs:line 0 2) Parent Failure : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.UserSignsUpWithDifferingPasswords on Firefox TestFixtureSetUp failed in UserRegistrationFeature 3) Parent Failure : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.UserSignsUpWithDifferingPasswords on Safari TestFixtureSetUp failed in UserRegistrationFeature 4) Parent Failure : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.UserSignsUpWithDifferingPasswords on IE TestFixtureSetUp failed in UserRegistrationFeature 5) Parent Failure : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.UserSignsUpWithDifferingPasswords on Chrome TestFixtureSetUp failed in UserRegistrationFeature 6) Parent Failure : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.UserSignsUpWithValidDetails on Firefox TestFixtureSetUp failed in UserRegistrationFeature 7) Parent Failure : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.UserSignsUpWithValidDetails on Safari TestFixtureSetUp failed in UserRegistrationFeature 8) Parent Failure : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.UserSignsUpWithValidDetails on IE TestFixtureSetUp failed in UserRegistrationFeature 9) Parent Failure : RegistrationForm.Tests.Acceptance.Features.UserRegistrationFeature.UserSignsUpWithValidDetails on Chrome TestFixtureSetUp failed in UserRegistrationFeature

Most of my atempts to fix this have been to edit the path to the dll in the transformed app.config file, though it should be the same as I am using nuget pachage restore.

Version 1.2.0 and SpecFlow Version 2.0.0

BaseClass.Contrib.SpecFlow.Selenium.Nunit version 1.3.1 has a dependencies of SpecFlow version 1.9.0. After installing that version, I get Build errors. I install SpecFlow version 2.0.0 and now getting this error...
"#error Generation error: Could not load file or assembly 'TechTalk.SpecFlow, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41' or one of its dependencies. The system cannot find the file specified."
It appears to me that the BaseClass.Contrib needs to be updated or allow updates to its dependencies. Am I correct?
Bottom line, I am having issues with the BaseClass.Contrib that I am getting from NuGet.
Thank you.
Carl

unable to run the specflow scenarios with baseclass from cmd line

i set up the baseclass @Browser:Chrome which helps a lot and i also got unitTestProvider in the App.config set to <unitTestProvider name="SeleniumNUnit" />

Im able to run the features from VS2015, but when it comes to running the features from cmd line, im unable to.

when i tried running as nunit by providing <unitTestProvider name="NUnit" />, it errors out.

Is there a way to run the specflow baseclass tagged features from cmd line? And can baseclass use different unitTestProvider?

Browser Tag not recognizing as Test Category

Hello,

I have VS 2015 professional and recently they had an update which I downloaded. Since then, the browser attribute tags I'm using in my feature file are not showing up anymore. In fact it only recognizes the first tag. Additional tags are not displaying in test explorer when grouping by traits. It looks exactly like an issue that was solved recently in another thread here:
SpecFlowOSS/SpecFlow#584.

Any help would be appreciated.

Thank you

Method Initialize in GeneratorPlugin does not have implementation

After setting up a basic google search test case, upon build I am receiving the following error.

error: 'Generation error: Method 'Initialize' in type 'Baseclass.Contrib.SpecFlow.Selenium.NUnit.GeneratorPlugin' from assembly 'Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'

Is there anything I may have to do extra which I haven't done already?

The plugin cannot be loaded

Hi,

As soon as I installed the library through NuGet I cannot run tests anymore because this error:

AngularJS.SpecFlow.Registration.RegistrationPageFeatureExampleFeature   (TestFixtureSetUp):
SetUp : TechTalk.SpecFlow.SpecFlowException : Unable to load plugin: Baseclass.Contrib.SpecFlow.Selenium.NUnit. Please check http://go.specflow.org/doc-plugins for details.
  ----> System.IO.FileNotFoundException : Could not load file or assembly 'Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin' or one of its dependencies. The system cannot find the file specified.

I installed the plugin through NuGet. I am using:

  • Visual Studio 2010
  • .NET 4.0
  • WebDriver 2.41.0.0
  • SpecFlow 1.9.0.77
  • nUnit 2.6.0.12051

They are basically the latest versions available in NuGet. I am using the default config. I can disable the plugin and then it works as before.

What maybe the problem?

The full exception is:

at TechTalk.SpecFlow.Infrastructure.RuntimePluginLoader.LoadPlugin(PluginDescriptor pluginDescriptor)
at TechTalk.SpecFlow.Infrastructure.TestRunContainerBuilder.<>c__DisplayClass3.<LoadPlugins>b__1(PluginDescriptor pd)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<ConcatIterator>d__71`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at TechTalk.SpecFlow.Infrastructure.TestRunContainerBuilder.CreateContainer(IRuntimeConfigurationProvider configurationProvider)
at TechTalk.SpecFlow.TestRunnerManager.CreateTestRunner(TestRunnerKey key)
at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(TestRunnerKey key)
at AngularJS.SpecFlow.Registration.RegistrationPageFeatureExampleFeature.FeatureSetup() in C:\Code\AngularJSPrototype\Prototype\AngularJS.SpecFlow\AngularJS.SpecFlow\Registration\Registration.feature.cs:line 0
--FileNotFoundException
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at TechTalk.SpecFlow.Infrastructure.RuntimePluginLoader.LoadPlugin(PluginDescriptor pluginDescriptor)

Thanks.

How to define the saucelabs job name for a scenario?

How do you define the job name for a scenario test running at sauce labs? Sauce labs docuementation states you set the 'name' property as a desiredcapability for the webdriver. Although you can set this is the app.config, it means you cannot set the name per scenario. Are you able to give me a suggestion as to where this might go? Love the project be the way :-)
Robert.

NullReferenceException when running tests

Hi,

Everytime I try to run a test, I get a null reference exception:

TestApplication.UiTests.CalculatorFeatureFeature.AddTwoNumbers:
System.NullReferenceException : Object reference not set to an instance of an object.

This is happening even in the examples provided in GitHub.
What I did:

  • downloaded the code from GitHub
  • opened the solution TestApplication.sln.
  • built it
  • opened the nUnit runner
  • opened the TestApplication.UiTests.dll library
  • run the tests
  • then I get:
TestApplication.UiTests.CalculatorFeatureFeature.AddTwoNumbers:
System.NullReferenceException : Object reference not set to an instance of an object.
TestApplication.UiTests.CalculatorFeatureFeature.AddTwoNumbers:
System.NullReferenceException : Object reference not set to an instance of an object.
TestApplication.UiTests.CalculatorFeatureFeature.AddTwoNumbers:
System.NullReferenceException : Object reference not set to an instance of an object.
TestApplication.UiTests.CalculatorFeatureFeature.AddTwoNumbers:
System.NullReferenceException : Object reference not set to an instance of an object.
TestApplication.UiTests.CalculatorFeatureFeature.BasepageIsCalculator:
System.NullReferenceException : Object reference not set to an instance of an object.
TestApplication.UiTests.CalculatorFeatureFeature.BasepageIsCalculator:
System.NullReferenceException : Object reference not set to an instance of an object.
TestApplication.UiTests.CalculatorFeatureFeature.BasepageIsCalculator:
System.NullReferenceException : Object reference not set to an instance of an object.

The exception details shows:

at NUnit.Core.Extensibility.ParameterSet.FromDataSource(Object source)
at NUnit.Core.Builders.TestCaseParameterProvider.GetTestCasesFor(MethodInfo method)

I am using:

  • VS 2013 Express
  • . NET 4.5
  • WebDriver 2.35.0.0
  • SpecFlow 1.9.0.77

I have tried in .NET 4.0 and Visual Studio 2010 with libraries compiled for that version, and got the same issue.

Any idea what could be the problem?

Base class 1.3 causing issue with specflow nunit

Error when added base class plugin with specflow in VS 2015. I have tried removing one of the unitTestProvider tag and when I build same issue. I alsocheck to make sure the reference in the project techtalk DLL local copy is set =true. Can you provide some other Idea on what I might need to check?

Thanks

Error:

error Generation error: Could not load file or assembly 'TechTalk.SpecFlow, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41' or one of its dependencies. The system cannot find the file specified.

VS Test Explorer shows External Tests

I have an issue with test explorer. It shows me the same test twice, once as internal to the project and once as external. Is this a runner issue, or how I have written my code?

I have:
Test1 on Chrome
Test1 on Chrome in Method1

error when installed from nuget

With a clean MVC 4 project in VS 2012, I add a new class library project, and then add nuget packages. I add specflow, webdriver, web driver support and this baseclass. as soon as I add a new feature file I get this error:

error Generation error: Unable to find plugin in the plugin search path: Baseclass.Contrib.SpecFlow.Selenium.NUnit. Please check http://go.specflow.org/doc-plugins for details.

I notice that the app.config plugins path refers to 1.0 not 1.1. however, this same issue ixists in the example project but that builds fine. What gives???

Build fails in visual studio 2017

Installed Baseclass.Contrib.Specflow.Selenium.Nunit and created a first feature file, with step definition and a page for login. But unable to do a successful build. please see the attached doc for the error in login.feature.cs file.
Login.Feature.cs.docx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.