OpenQA.Selenium.WebDriverException : unknown error: cannot find Chrome binary - azure-devops

I am trying to run my tests on Azure Devops pipeline and I am getting the below mentioned error. Most solutions are asking to specify (hard-code) the binary path but that can not be implemented on servers. Furthermore, the tests run fine locally.
It seemed like the agents did not have chrome installed, but then again, these tests ran fine on the same agent pool a while back.
NUnit Adapter 3.15.0.0: Test execution complete
X CreateAgentApp [< 1ms]
Error Message:
OneTimeSetUp: OpenQA.Selenium.WebDriverException : unknown error: cannot find Chrome binary
X CreateProject [< 1ms]
Error Message:
OneTimeSetUp: OpenQA.Selenium.WebDriverException : unknown error: cannot find Chrome binary
X CreateSPAApp [< 1ms]
Error Message:
OneTimeSetUp: OpenQA.Selenium.WebDriverException : unknown error: cannot find Chrome binary
I am initializing the ChromeDriver with the following options:
{
ChromeOptions options = new ChromeOptions();
options.AddArgument("--disable-features=VizDisplayCompositor");
return options;
}
Secondly, is it possible to add a demand variable in pipeline settings to check Chrome existence.

Since demands syntax cannot detect the existence of Chrome.
I manually checked this site.and found Chrome and chromedriver.exe are installed in microsoft-hosted agent pools Hosted Windows 2019 with VS2019 and Hosted VS2017.
You can just run selenium ui tests against these agent pools.
Don't know how you set the chromedriver path? But I found a way to get the chromedriver.exe path of the agents using below powershell scripts. And the path is
C:\SeleniumWebDrivers\ChromeDriver on agent.
$driverpath = Get-ChildItem Env:ChromeWebDriver
For test purpose i hard code above driver path in my code. The tests ran as expected on hosted agents.
If you dont want to hard code the path, you can add a powershell task to output driver path, and replace the driver path in your test code with the parameters in your test .runsettings files
echo "##vso[task.setvariable variable=chromedriverpath;isOutput=true]$driverpath"

I had the same issue and found that chromedriver and Chrome versions should be compatible. MS hosted agents have both preinstalled as mentioned in other answers (refs: MS-Hosted Agents, Windows-2019/latest).
To ensure the versions work, there are few options depending on the scenario.
If chromedriver is expected to be in the output directory, e.g. using Selenium.WebDriver.ChromeDriver, then either;
use the same versions of chromedriver and Chrome of the build server (see refs above) in code; or
copy chromedriver from the build server to the output directory during build using the environment variable $Env:ChromeWebDriver.
Copy-Item "$env:ChromeWebDriver/chromedriver.exe" -Force -Destination "**/bin/Release/*/"
Alternatively, set the driver path dynamically; maybe checking for the environment variable ChromeWebDriver.
pseudo-code for illustration only
...
var driverDir = Environment.GetEnvironmentVariable("ChromeWebDriver");
var driverPath = !string.IsNullOrWhiteSpace(driverDir)
? Path.Combine(driverDir, "chromedriver.exe")
: "relative/path"; // see below
// init the driver or add to options
var driver = new ChromeDriver(driverPath)
...
For the relative path, see this question How can I instantiate a new ChromeDriver using a relative path in C#?

Related

Unable to run/debug robot tests in vscode - robocorp extensions installed

I have installed Robocorp Code as well as Robot Framework Language Server and have configured them. However, I am still having errors when trying to run the tests via the code lens options.
Repo - A webapi repo with a specific folder containing all tests. Lets call it regression.
RF - 4.1.3
Python - 3.8
This is what happens when I click on Run on the code lens for any of the tests -
`PS C:\git\xxxx\regression> C:; cd 'C:\git\xxxx\regression'; &
'C:\Users\xxxx\AppData\Local\Temp\rf-ls-run\run_env_00_smh5defr.bat'
'-u'
'c:\Users\xxxx.vscode\extensions\robocorp.robotframework-lsp-0.47.2\src\robotframework_debug_adapter\run_robot__main__.py'
'--port' '54331' '--no-debug' '--argumentfile'
'C:\git\xxxx\regression\args-local.txt' '--pythonpath'
'c:\git\xxxx\regression\common\lib' '--variable'
'EXECDIR:C:/git/xxxx/regression'
'--prerunmodifier=robotframework_debug_adapter.prerun_modifiers.FilteringTestsSuiteVisitor'
'c:\git\xxxx\regression\api\api_Test.robot'
[ ERROR ] Parsing'--pythonpath' failed: File or directory to execute does not exist.
However, the test starts if I remove the argumentfile parameter but it, of course, fails because its missing arguments from the file.
Do note that the folder specified in pythopath exists and has some python libraries needed for the tests.

Why is Install4j executable signing not working any more?

I'm trying to build an Install4j project that was working fine a few weeks ago, but now it's complaining about a timestamp service not being available while the executable is being signed. Is there another timestamp service we should be using or is this one only temporarily offline?
I'm using Install4j 7.0.12.
Preparing configuration
Creating media file 'Windows':
Collecting files:
Compiling launchers:
Compiling launcher 'test':
Signing executable
Build failed.
Cause: java.io.IOException
http://timestamp.globalsign.com
You can set a different timestamp signing service by setting the VM parameter -Dinstall4j.timestampUrl=http://... in bin/install4j.vmoptions
or by setting the compiler variable sys.ext.timestampUrl in your project.
Cause: java.io.FileNotFoundException
http://timestamp.globalsign.com
Adding an entry to General Settings > Compiler Variables with the following details seems to do the trick:
sys.ext.timestampUrl = http://timestamp.sectigo.com
This is probably related to http://timestamp.verisign.com/scripts/timstamp.dll not available.

The specified task executable "postsharp.4.0-x86.exe" could not be run. The filename or extension is too long

PostSharp build step fails with
The specified task executable "postsharp.4.0-x86.exe" could not be
run. The filename or extension is too long
when run on build machine or locally with PostSharpHost=Native.
The cause looks to be the large number of references passed to postsharp.4.0-x86.exe via /P:ResolvedReferences parameter.
It works fine locally when using default PostSharpHost=PipeServer. However, PipeServer value is being ignored on build machine when build is run in non-interactive mode.
What are the options to resolve this issue? Is is possible to force using PipeServer on the build machine in non-interactive mode?
Here is a fragment from build log causing the issue:
C:\ProgramData\PostSharp\3.1.73\bin.Release\postsharp.4.0-x86.exe obj\Release\Before-PostSharp\Xxx.xxxxxxxxxxxxxxx.dll /X:default /NoLogo /L:44054-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /P:Output=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxs\obj\Release\Xxx.xxxxxxxxxxxxxxx.dll /P:ReferenceDirectory=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.Xxxxx.XxxxXxxxx /P:Configuration=Release /P:Platform=AnyCPU "/P:SearchPath=..\bin\|obj\Release\|C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\|C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\ " /P:IntermediateDirectory=obj\Release\PostSharp /P:CleanIntermediate=False /P:MSBuildProjectFullPath=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxs\Xxx.Xxxxx.XxxxXxxxx.csproj /P:SignAssembly=False /P:PrivateKeyLocation= /P:PrivateKeyContainer= /P:DelaySign= "/P:ResolvedReferences=C:\Dev\Xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\AWSSDK.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\BitSyntax\lib\net45\BitSyntax.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\BitSyntax\lib\net45\BitSyntaxCs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Castle.Core.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Castle.Windsor.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\FileHelpers.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FSharp.Core\lib\net40\FSharp.Core.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FSharp.Data\lib\net40\FSharp.Data.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler.CSharp\lib\net45\FsPickler.CSharp.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler\lib\net45\FsPickler.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler.Json\lib\net45\FsPickler.Json.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsUnit\Lib\Net40\FsUnit.NUnit.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxg\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxg\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxi\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxi\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-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xxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxs\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxxxs\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxl\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-
The issue has been fixed in PostSharp 4.2.14. Please update to the latest version.

How can I fix tests in Ember testem with errors such as 'could not load', 'failed', 'could not find module' or 'died'?

I managed to get a couple of EAK/grunt based Ember apps upgraded to 1.11 with HTMLBars, and then got them migrated to Ember CLI/Brocolli. The unit tests were setup for karma test runner so I'm looking at how to get those running in the CLI projects now, but I didn't write the tests and really have no experience with unit testing javascript modules.
Searching around the iNet, I can see that others have also used karma becasue of its coverage output and are trying to get it to work with Ember CLI, but that Ember Core isn't supporting it, though they say anyone should be able to get it set up with a custom addon. I'm also trying to use the 'testem' runner to see what sticks with that.
The Ember site does have an 'automating tests with runners' page for v1.10, with sections on 'testem' and 'karma', but it doesn't appear for v1.11 so I can't tell from that site what is or isn't relevant. But it seems like I should be able to work out a solution for the karma test runner, so I added the old devDependencies to the project package.json:
"karma": "^0.12.31",
"karma-chai": "~0.1.0",
"karma-chrome-launcher": "~0.1.2",
"karma-coverage": "~0.2.1",
"karma-firefox-launcher": "~0.1.3",
"karma-junit-reporter": "~0.2.1",
"karma-mocha": "~0.1.3",
"karma-phantomjs-launcher": "~0.1.2",
"karma-sinon-chai": "~0.1.5"
I also dropped the old 'karma.conf.js' (along with a few other karma confs) in the project and updated the paths inside (from 'vendor' to 'bower_components'). I did find a 'ember-cli-karma' node mode and installed it, but it seems to just have a 'package.json'. It has no docs and seems like just a stubbed out starter project with no implementation. I also installed 'karma', 'karma-cli' and 'testem' node modules.
The testem docs say to add you src and test files to 'testem.json', but with out examples I don't know what that means; a list of every src and test file? With what path; relative, absolute? Forward slashes, backslashes? preceded with / or ./ or ../? I just left them out because I think the system just finds the src and tests by convention.
When I run 'karma init' I get:
readline.js:529
this.line = this.line.slice(this.cursor);
^
TypeError: Cannot read property 'slice' of undefined
When I run 'testem' I get:
TEST'EM 'SCRIPTS!
Open the URL below in a browser to connect.
http://localhost:7357/aN;0faN;NaNf
...then the project's '../tests/index.html' loads in a browser, but is not able to 'find' any of the asset files (css, js) so nothing executes or renders correctly. I just see template expressions ({{content-for 'head'}}, etc).
When I run 'ember test' I get:
Building...BuildingBuilding.Building..Building...Built project successfully.
1..0
# tests 0
# pass 0
# fail 0
# ok
No tests were run, please check whether any errors occurred in the page (ember test --server) and ensure that you have a test launcher (e.g. PhantomJS) enabled.
When I run 'ember test --server' I get:
The test index.html loaded in a browser with a test report. When I uncheck 'hide passed tests' the report indicates '29 passed, 28 failed'. It has 11 sections where a particular test may have 3 problems such as 'could not load', 'failed', 'could not find module', 'attempting to register an unknown factory' or 'died'.
With this, I'm obviously running testem and not karma, so may as well work on getting testem working and figure out karma later. If there were more examples and migration troubleshooting docs I might have a systematic way to work through some of these problems.
I ran into "No tests were run,..." problem recently after a node upgrade. I fixed it with a:
npm install -g phantomjs
This provides some additional options as well:
https://github.com/ember-cli/ember-cli/issues/3969
I had the Cannot read property 'slice' of undefined error on MS Windows, running via MSys2. I have solved it by using karma init from an ordinary cmd prompt.

Gallio with NCover shows 0% code coverage in Sonar UI

I am using sonar-runner to run tests and code coverage over my C# code with the help of gallio plugin. The tests are running fine, but I am not able to see any code coverage on the sonar web UI.
My Sonar settings are as follows:
sonar-project.properties
mentioning only relevant bits
sonar.gallio.coverage.tool = NCover
sonar.NCover.installDirectory = C:/Program Files/NCover
sonar.donet.visualstudio.testProjectPattern = .Test
sonar.dotnet.buildConfigurations = "Release|x86"
Any idea what coule be missing??
sonar.projectKey=XXX:XXX
sonar.projectVersion=trunk
sonar.projectName=XXX
sources=.
sonar.language=cs
sonar.dotnet.visualstudio.solution.file=Project.sln
sonar.dotnet.excludeGeneratedCode=false
sonar.dotnet.4.0.sdk.directory=C:/WIndows/Microsoft.NET/Framework/v4.0.30319
sonar.dotnet.version=4.0
# Gallio
sonar.gallio.mode=
sonar.gallio.coverage.tool=NCover
sonar.gallio.runner=IsolatedAppDomain
sonar.NCover.installDirectory=c:/Program Files/NCover
sonar.gallio.installDirectory=C:/Program Files/Gallio
sonar.dotnet.test.assemblies=$(SolutionDir)/../**/bin/**/*.Tests.Unit.dll
# FXCop
sonar.fxcop.mode=
#StyleCop
sonar.stylecop.mode=
#NDeps
sonar.ndeps.mode=skip
sonar-runner.properties
You said
sonar.dotnet.buildConfigurations = "Release|x86"
If that's true, your build likely isn't generating .pdb files, which are needed to figure out the mapping between the binaries and your source files.
Does it work if you try it with a Debug build?
I was seeing this same behavior with NCover in Sonar. I found that Sonar was generating invalid arguments for Gallio's NCover runner.
Try piping the output from Sonar's runner into a text file so that you can examine the arguments more easily (on the command line, you can just type sonar-runner > output.txt to do this).
You will likely see a line like this in your output:
INFO .u.c.CommandExecutor - Executing command: C:\Program Files\Gallio\bin\Gallio.Echo.exe /r:Local /report-directory:E:\Reports\.sonar /report-name-format:gallio-report /report-type:Xml E:\Projects\UnitTests\bin\Release\UnitTests.dll /runner-property:NCoverCoverageFile=E:\Reports\.sonar\coverage-report.xml /runner-property:NCoverArguments=//ias MyFirstAssembly;MySecondtAssembly;MyThirdAssembly
If you attempt to execute this manually via Gallio on the command line, you will get an error:
Cannot find file 'MyFirstAssembly;MySecondtAssembly;MyThirdAssembly'
If you edit this list manually down to a single entry such as MyFirstAssembly*, everything will work as expected.
This seems to indicate that Sonar is generating invalid command line arguments for Gallio. As much as I love NCover, the easiest solution was to use OpenCover instead.