TestStack / TestStack.Seleno

Seleno helps you write automated UI tests in the right way by implementing Page Objects and Page Components and by reading from and writing to web pages using strongly typed view models.
http://teststack.github.com/TestStack.Seleno/
MIT License
180 stars 60 forks source link

System.IO.FileLoadException...executing tests in C:\......\bin\TestStack.Seleno.dll #191

Open robertgtaylor1 opened 9 years ago

robertgtaylor1 commented 9 years ago

I've created a UI test using Seleno and it works perfectly under VS[2013] NUnit test runner, but the CI build on the TFS server reports the FileLoadException even though the test is now marked as [Ignore].

This doesn't completly fail my gated check-in; on partially, so the commit goes ahead, but I'd like to make it 'green'.

Any idea which file is failing to load? I changed the Host class (from the sample) to a singleton so that it only creates the SeleniumHost when first used so nothing should be loaded if the test isn't running.

robdmoore commented 9 years ago

Can you paste in the exception message?

On 14 Jan 2015, at 5:45 pm, Rob Taylor notifications@github.com wrote:

I've created a UI test using Seleno and it works perfectly under VS[2013] NUnit test runner, but the CI build on the TFS server reports the FileLoadException even though the test is now marked as [Ignore].

This doesn't completly fail my gated check-in; on partially, so the commit goes ahead, but I'd like to make it 'green'.

Any idea which file is failing to load? I changed the Host class (from the sample) to a singleton so that it only creates the SeleniumHost when first used so nothing should be loaded if the test isn't running.

— Reply to this email directly or view it on GitHub.

robertgtaylor1 commented 9 years ago

Exception System.IO.FileLoadException, Exception thrown executing tests in C:\Builds\1\Logical\Debug Build\bin\TestStack.Seleno.dll

Could this be caused by missing dependencies? Seleno appears to have dependencies on AutoFac and AllForOne but these aren't listed on the NuGet page and aren't installed.

robdmoore commented 9 years ago

Those dependencies are ilmerged in.

Is that all you get? Normally there should be more detail that tells you what dll is missing.

In this case though I have a suspicion the problem is likely to be the mvc dll, which we unfortunately have a sort of dependency on at the moment.

If mvc is in the GAC on your machine, but not the build server that might be it. Try adding mvc with NuGet and see if the error goes away.

On 14 Jan 2015, at 6:05 pm, Rob Taylor notifications@github.com wrote:

Exception System.IO.FileLoadException, Exception thrown executing tests in C:\Builds\1\Logical\Debug Build\bin\TestStack.Seleno.dll

Could this be caused by missing dependencies? Seleno appears to have dependencies on AutoFac and AllForOne but these aren't listed on the NuGet page and aren't installed.

— Reply to this email directly or view it on GitHub.

robertgtaylor1 commented 9 years ago

That's all that's reported in the build log. MicrosoftWebMvc has a dependency on Mvc2Futures - which doesn't appear to exist any more. (There's now an Mvc3Futures.)

(I have a problem as I'm working behind a firewall that doesn't give me access to NuGet.Org, so I have to download the NuPkg and install-package from the download.)

robdmoore commented 9 years ago

The package you are looking for is microsoft.aspnet.mvc. Grab the latest version 3 one.

That's all that's reported in the build log. MicrosoftWebMvc has a dependency on Mvc2Futures - which doesn't appear to exist any more. (There's now an Mvc3Futures.)

(I have a problem as I'm working behind a firewall that doesn't give me access to NuGet.Org, so I have to download the NuPkg and install-package from the download.)

— Reply to this email directly or view it on GitHub.

robertgtaylor1 commented 9 years ago

OK, I resloved the issue with Mvc2Futures but sill get the same error.

robdmoore commented 9 years ago

Can you run fuslogvw.exe on the CI server to view all the assembly bindings and find the problem?

On 14 Jan 2015, at 7:49 pm, Rob Taylor notifications@github.com wrote:

OK, I resloved the issue with Mvc2Futures but sill get the same error.

— Reply to this email directly or view it on GitHub.

robertgtaylor1 commented 9 years ago

My main web project already reference microsoft.aspnet.mvc v5.2.2 and is referenced in the test project so I can use the controllers (as sugested) to support...

Host.Instance.NavigateToInitialPage<HomeController, HomePage>(x=>x.Index());

EmiiFont commented 8 years ago

did you fix this?

robertgtaylor1 commented 8 years ago

I'm not sure I did. I decided to use Selenol instead as it fitted with what I wanted to do.

-----Original Message----- From: "Emilio Font" notifications@github.com Sent: ‎02/‎11/‎2015 01:06 To: "TestStack/TestStack.Seleno" TestStack.Seleno@noreply.github.com Cc: "Rob Taylor" rgt1@rocketmail.com Subject: Re: [TestStack.Seleno] System.IO.FileLoadException...executing testsin C:......\bin\TestStack.Seleno.dll (#191)

did you fix this? — Reply to this email directly or view it on GitHub.

wayne-o commented 8 years ago

I had this when I had spaces in the path to my project