icnocop / cuite

Coded UI Test enhanced Framework
Microsoft Public License
52 stars 29 forks source link

Browser not launched upon Running/Debugging tests from VSTS Enterprise 2017 #117

Closed umakanthk closed 5 years ago

umakanthk commented 7 years ago

Hi, I had installed VSTS Enterprise edition 2017. I was able to build my automation solution fine but when i tried to run/debug tests from VSTS ,browser is not launched(It does nothing). Also i don't see any tests loaded on Test explorer window. I have installed NUnit 3 Test Adapter as well. Process Architecture is X86.

Not sure what is causing the run to break, could someone please help us here.

icnocop commented 7 years ago

Hi.

CUITe only works with Microsoft's Test Framework, but CUITe doesn't support Visual Studio 2017 yet.

Try to create a new Coded UI Test Project and create a simple browser test without referencing CUITe to see if the test shows up in the Test Explorer window and to see if it can launch the browser when run.

If it doesn't, than the issue isn't related to CUITe and you may get better support from Microsoft in their support forum here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vstest

Thank you.

umakanthk commented 7 years ago

Hi, Thanks for prompt response. I just created a new coded UI Test project without referencing CUITe and i am seeing the test under Test explorer window and browser launched successfully.

umakanthk commented 7 years ago

Could you please assist us on steps to be followed if we want to make use of CUITe.dll on VSTS enterprise 2017.

icnocop commented 7 years ago

Hi.

These are the steps I would take if I were to add support for Visual Studio 2017:

  1. Fork the repository
  2. Edit Build.proj and add calls to MSBuild and Exec for the new VisualStudioVersion
  3. Edit src\CUITe\CUITe.csproj, CUITe.Silverlight\CUITe.Silverlight.csproj, and CUITe.IntegrationTests\CUITe.IntegrationTests.csproj and add properties for the new VisualStudioVersion
  4. Add dependencies to Third Party\CUIT\v15
  5. Add CUITe\CUITe for Visual Studio 2017.nuspec
  6. Add CUITe.Silverlight\CUITe.Silverlight.VS2017.nuspec
  7. Add CUITe.IntegrationTests\NuGet\VisualStudio2017\vsts.cs
  8. Add tests to CUITe.IntegrationTests\NuGet\NuGet.feature
  9. Add new NuGet deployment items to CUITe.IntegrationTests\NuGet\NuGet.feature.custom.cs
  10. Add code for Visual Studio 2017 tests in CUITe.IntegrationTests\NuGet\NuGetFeatureSteps.cs
  11. Run Build.bat and resolve any compiler errors
  12. Run Test.bat and resolve any broken tests
  13. Create a pull request

Thank you.

umakanthk commented 7 years ago

Thanks once again for the detailed steps. I executed all the steps ( from 1 through 10) and when i ran Build.bat i see two errors. Attaching the error screenshot.

2017 build error

From the error, i see that it is looking for a file under vs2017 folder in C:\Users\ukuntla\Downloads\cuite-master (2)\cuite-master\src\SystemsUnderTest\Sut.Silverlight\bin\Release path which is not available. error

PFA SCreenshot.

Also, from the reference link (https://www.visualstudio.com/en-us/productinfo/vs2017-compatibility-vs) i see a note at the end which says that silverlight projects are not supported on VSTS 2017. Just thinking if this is causing any of above issues.

umakanthk commented 7 years ago

Could you please help us out here

icnocop commented 7 years ago

If Silverlight projects are no longer supported in Visual Studio 2017, then build.proj should be updated accordingly. For example, CUITe.Silverlight, the related NuGet package, and Sut.Silverlight* projects should not be built for Visual Studio 2017.

umakanthk commented 7 years ago

i have updated all relevant files but still seeing 200+ errors. Attaching the files updated for VSTS 2017 without silverlight. It would be helpful if you can review and let me know for any corrections.

New folder (2).zip

umakanthk commented 7 years ago

could you please help us out here, I was doing this setup for the first time and might have done few errors during the process , kindly please help and suggest us with the feasible options to move forward.

icnocop commented 7 years ago

What errors do you get?

umakanthk commented 7 years ago

Please find the attached error info. errors.docx

icnocop commented 7 years ago

You can try the code here: https://github.com/icnocop/cuite/pull/118

It's still work in progress because:

  1. The build doesn't work on appveyor yet.
  2. Visual Studio 2017 NuGet package integration tests fail because of changes to Visual Studio 2017 that cause IDE automation tests to fail.
umakanthk commented 7 years ago

Thanks for the details. I took the updated code from 'vs2017' branch. When i ran Build.bat i get the attached error. Please let me know if iam missing anything. vs2017builderror

icnocop commented 7 years ago

Did you double click on Build.bat, or how did you run it?

umakanthk commented 7 years ago

i tried double clicking on it. When i tried Run as Adm err in it displayed attached error

umakanthk commented 7 years ago

could you please help us out here.

icnocop commented 7 years ago

Please try the code from the latest commit in the vs2017 branch which fixes the path issues that had produced the errors:

  1. 'SetupDevelopmentEnvironment.bat' is not recognized as an internal or external command, operable program or batch file.

  2. MSBUILD: error MSB1009: Project file does not exist.

Thank you.

iToddi commented 6 years ago

Are there plans to officially release support Visual Studio 2017? I assume the VS2017 branch is an effort to move in that direction. Is there an ETA for this?

icnocop commented 6 years ago

Hi @iToddi .

Unfortunately, I can't really provide an ETA as I have other priorities right now.

Yes, the plan is to release a new version with VS2017 support, but there are some tests that still fail when run as part of the build, and some also produce warnings.

Build status and history can be found here: https://ci.appveyor.com/project/icnocop/cuite.

Thank you.

icnocop commented 5 years ago

Visual Studio 2017 support was added and new NuGet packages published here: CUITe.VS2017 CUITe.Silverlight.VS2017

Their version numbers are 2.1.50-beta. They're still marked as preview release.

Please report any issues you may find.

Thank you.