ticketmaster / poshspec

Infrastructure Testing DSL running in Pester
MIT License
183 stars 32 forks source link

http test requires Internet Explorer #16

Closed Sam-Martin closed 8 years ago

Sam-Martin commented 8 years ago

Running http tests from a headless PowerShell session will fail due to a lack of Internet Explorer.

E.g. running

Describe 'Website' {
    Http "http://localhost" StatusCode { Should Be 200 }
}

From Octopus deploy as a job step results in:

NotSupportedException: The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again. 
14:52:45Info
   at <ScriptBlock>, <No file>: line 1
14:52:45Info
   at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\poshspec\Private\Invoke-PoshspecExpression.ps1: line 12

As far as I can tell none of the Properties supported by this test require complex parsing in IE, so I suggest just adding the -usebasicparsing flag.

Sam-Martin commented 8 years ago

@cdhunt Any chance of doing a release to the PSGallery so we can get this out in the wild pretty please? :)

cdhunt commented 8 years ago

v2.1.10 has been published to GitHub and the Gallery.