Team City MSTest runner exits with not zero code - Symantec - continuous-integration

I am trying to set up Team City CI on Server 2012R2
The MSTest build runner step fails to run.
NunitLauncher.exe fails on server 2012[R2], even from command prompt
NunitLauncher.exe runs fine on Server 2012.
This works fine at home on the following configuration (TeamCity 8.0.6 on Server 2012) At work, for some reason, this won't. (TeamCity 8.0.6 running on Server 2012[R2])
When executing MSTest build runner step, I see the following: (Server 2012R2, Visual Studio 2013)
[18:40:33]Step 2/2: Run Unit Tests (MSTest) (3s)
[18:40:33][Step 2/2] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[18:40:33][Step 2/2] in directory: C:\TeamCity\buildAgent\work\b00779c1ff5b6b7b
[18:40:37][Step 2/2] Process exited with code 255
[18:40:37][Step 2/2] Step Run Unit Tests (MSTest) failed
When I try and run JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit from command prompt I get the following error:
TeamCity .NET NUnitBootstrap has stopped working
Problem signature:
Problem Event Name: BEX
Application Name: JetBrains.BuildServer.NUnitLauncher.exe
Application Version: 8.0.23.0
Application Timestamp: 527e788a
Fault Module Name: JetBrains.BuildServer.NUnitLauncher.exe
Fault Module Version: 8.0.23.0
Fault Module Timestamp: 527e788a
Exception Offset: 00005bce
Exception Code: c0000005
Exception Data: 00000008
OS Version: 6.3.9600.2.0.0.272.7
Locale ID: 1033
Additional Information 1: 5861
Additional Information 2: 5861822e1919d7c014bbb064c64908b2
Additional Information 3: 01d7
Additional Information 4: 01d7340064827245f2249cd1f1a7c264
I have installed on two different servers running Server 2012 R2 with the same failed results.
I install on Server 2012 and the NUnitLauncher.exe runs without issue...
Team City Dev team, any ideas?

We resolved this with SEP server side exceptions, TeamCity identified the root cause as unsigned assemblies. Here is the URL for the TeamCity bug fix: http://youtrack.jetbrains.com/issue/TW-35167

Related

Specflow Test with Data Tables runs from Agent or Client Fails on Azure Pipeline VS Test Task

BLUF:
Without Specflow Data Table tests run fine from Azure Pipeline
With Specflow Data Table tests fail from Azure Pipeline
Setup
SpecFlow 3.1 or 3.3
MSTest as Test Runner
packages.config
.feature.cs files are generated using SpecFlow.Tools.MsBuild.Generation NuGet package
VS 2019
SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings Disabled
.NET Framework 4.5.1 (Framework on Self-hosted Machine .NET 4.7)
TFS/VSTS/Azure DevOps – Task – Visual Studio Test Task 2.*
Configuration
Visual Studio C# Selenium Test Project
Uses Extent Reports
DotNetSeleniumExtras Page Objects
MSTestTestAdapter and Framework
Selenium and Chrome Driver
Data Tables in the Feature File
Azure Visual Studio Tasks on Build or Release Pipeline
Test Assembly Runs with an .exe and not a .dll
Azure VSTest Task uses testhost.x86.exe
Actions:
Create a Selenium Specflow Test with a Data Table in Visual Studio
Push to a Repo
Set up a Build or Release Pipeline with a Visual Studio Test Task (Test acts the same way on either)
Run the Pipeline
Results:
Tests with or without data tables run without error from the client machine via Visual Studio Test Explorer
Tests with or without data tables run without error from the custom local agent machine via Visual Studio Test Explorer or when run with vstest.console.exe from the command line
Tests without data tables run without error from the custom local agent machine via Visual Studio Test Explorer or when run with vstest.console.exe from the command line
Tests with data tables fail with the following error from an Azure Pipeline Visual Studio Task
dmp file error: Process Name: testhost.x86.exe : C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\Extensions\TestPlatform\testhost.x86.exe
Process Architecture: x86
Exception Code: 0xC0000005
Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Heap Information: Not Present
System Information
OS Version: 10.0.14393
CLR Version(s): 4.7.3620.0
Azure PipelineError output:
Test method HappyTest.Features.CPUF.YPUCC_1 threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.
AventStack.ExtentReports.Model.ExceptionInfo..ctor(Exception ex)
AventStack.ExtentReports.ExtentTest.Log(Status status, Exception ex, MediaEntityModelProvider provider)
AventStack.ExtentReports.ExtentTest.Fail(Exception ex, MediaEntityModelProvider provider)
UtilityLibrary.Utilities.Hooks.Hooks.InsertReportingSteps(ScenarioContext InjectedText) in D:\DevOpsAgent\_work\8\s\UtilityLibrary\Utilities\Hooks\Hooks.cs: line 188 lambda_method(Closure , IContextManager , ScenarioContext )
TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) in D:\a\1\s\TechTalk.SpecFlow\Bindings\BindingInvoker.cs: line 69
TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.InvokeHook(IBindingInvoker invoker, IHookBinding hookBinding, HookType hookType) in D:\a\1\s\TechTalk.SpecFlow\Infrastructure\TestExecutionEngine.cs: line 351
TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(HookType hookType) in D:\a\1\s\TechTalk.SpecFlow\Infrastructure\TestExecutionEngine.cs: line 340
TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireScenarioEvents(HookType bindingEvent) in D:\a\1\s\TechTalk.SpecFlow\Infrastructure\TestExecutionEngine.cs: line 321
TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnStepEnd() in D:\a\1\s\TechTalk.SpecFlow\Infrastructure\TestExecutionEngine.cs: line 304
TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance) in D:\a\1\s\TechTalk.SpecFlow\Infrastructure\TestExecutionEngine.cs: line 470
TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.Step(StepDefinitionKeyword stepDefinitionKeyword, String keyword, String text,
String multilineTextArg, Table tableArg) in D:\a\1\s\TechTalk.SpecFlow\Infrastructure\TestExecutionEngine.cs: line 581
TechTalk.SpecFlow.TestRunner.Given(String text, String multilineTextArg, Table tableArg, String keyword) in D:\a\1\s\TechTalk.SpecFlow\TestRunner.cs: line 79
HappyTest.Features.CPUF.YPUCC(Anonymized Data Fields Here) in D:\DevOpsAgent\_work\8\s\HappyTest\Features\CreatePersonalUser.feature: line 12
HappyTest.Features.CPUF.YPUCC_1() in D:\DevOpsAgent\_work\8\s\HappyTest\Features\CreatePersonalUser.feature: line 11
-> Loading plugin D:\DevOpsAgent\_work\8\s\HappyTest\bin\Release\TechTalk.SpecFlow.MSTest.SpecFlowPlugin.dll
-> Using app.config
Given The user navigates to Sbn Test
:: The page type is HappyTest.Pages.BasePage
:: Sbn Test Page Displayed
-> done: BaseScenarioSteps.GivenUserNavigatesToSbnTest() (2.0s)
Given The user selects Personal Subscribe Yearly
:: The page type is HappyTest.Pages.SbnHome
-> error: Timed out after 10 seconds
:: WebDriver Stopped
YAML
pool:
name: qa-automation
demands:
- msbuild
- visualstudio
variables:
BuildPlatform: ''
BuildConfiguration: 'Debug'
steps:
- task: NuGetToolInstaller#1
displayName: 'Use NuGet 5.3.1'
inputs:
versionSpec: 5.3.1
- task: NuGetCommand#2
displayName: 'NuGet restore'
inputs:
restoreSolution: SeleniumTest.sln
- task: VSBuild#1
displayName: 'Build solution SeleniumTest.sln'
inputs:
solution: SeleniumTest.sln
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: PublishSymbols#2
displayName: 'Publish symbols path'
inputs:
PublishSymbols: false
- task: CopyFiles#2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(BuildConfiguration)\**'
TargetFolder: '$(build.artifactstagingdirectory)'
CleanTargetFolder: true
OverWrite: true
- task: PublishBuildArtifacts#1
displayName: 'Publish Artifact: drop'
- task: VisualStudioTestPlatformInstaller#1
displayName: 'Visual Studio Test Platform Installer'
inputs:
versionSelector: latestStable
- task: VSTest#2
displayName: 'VsTest - testAssemblies'
inputs:
testAssemblyVer2: |
!**\*TestAdapter.dll
**\HappyTest.exe
!**\obj\**
runTestsInIsolation: true
otherConsoleOptions: '/Tests:Happy_1'
testRunTitle: 'Validate Specflow Data Table Tests'
diagnosticsEnabled: true
collectDumpOn: always
VS Actions Tried Unsuccessfully
Updated SpecFlow to Beta 3.3
Updated Selenium and most other packages
Updated Dependencies in app.config
Updated .NET Framework to 4.6.2 then reverted
Added Additional waits before and after browser rendering
Tried toggling between x86 vs x64 vs any cpu architecture on Build Platform
Used full app.config
Added 60 second WebDriverWait
Azure Actions Tried unsuccessfully:
Changed multiple parameters on the Build and Release Tasks
Changed all variables from release to debug
Tried tests on both Azure and Local Agents
Changed Visual Studio versions from 2017 to 2019 and latest on the VS Build Task
Checked Run Tests in isolation
Pushed Packages Folder to Release Drop

dotMemory Unit Standalone launcher with XUnit hang at the end of the test

I am using dotMemory Unit Standalone launcher on a gitlab CI server to lauch XUnit unit test.
The test succeed but the process hang at the end then the test is considered failed because it hit the timeout.
The test output the result before getting stuck
testing Test.Memory...
$ output\memorytools\dotMemoryUnit output\xunit.console.exe --work-dir=output --propagate-exit-code --no-instrumentation --no-auto-cleanup --no-updates --log-level=VERBOSE -- UbikeyOfficeVerticalUiTest.dll -namespace %TestNamespace% -html test_results.html -verbose -stoponfail
dotMemory Unit 3.0 part of 2017.3 build 111.0.20171219.95427. Copyright (C) 2015-2017 JetBrains s.r.o.
xUnit.net Console Runner (64-bit Desktop .NET 4.0.30319.42000)
Discovering: Test
Discovered: Test
Starting: Test
...
(test log)
...
Finished: Test
=== TEST EXECUTION SUMMARY ===
Test Total: 1, Errors: 0, Failed: 0, Skipped: 0, Time: 7.243s
I use the folowing command in the gitlab-ci.yml to lauch the test
'output\memorytools\dotMemoryUnit output\xunit.console.exe --work-dir=output --propagate-exit-code --no-instrumentation --no-auto-cleanup --no-updates --log-level=VERBOSE -- Test.dll -namespace %TestNamespace% -html test_results.html -verbose -stoponfail'
The output folder contains the xunit.console executable and the test dll and it's dependencies. the memorytools folder containt everything from the tool folder of the JetBrains.dotMemoryUnit nuget package
The test is just:
[Retry]
public void TestImageMemoryLeak()
{
true.ShouldBeTrue();
}
There is no problem when lauching test with Xunit without dotMemory.
Also the test do not hang when I lauch it with dotmemory localy on my computer.
Version used:
JetBrains.dotMemoryUnit 3.0.20171
xunit.runner.console 2.4.1
GitLab Community Edition 11.4.5

Specflow running with MSTest

I am using VS2013.
I am trying to run the *.dll from the MSTest, but it fails without any execution.
If I execute the same test case manually, it always pass.
Below is the command line execution lines:
c:>"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest" /testcontainer:"E:\E_Drive\TFS_Work\PlatformSoftware\Embedded\AutomatedRe
gressionTests\Main\bin\Debug\YDOA.dll" /category:"TRLYS1D"
Microsoft (R) Test Execution Command Line Tool Version 12.0.21005.1
Copyright (c) Microsoft Corporation. All rights reserved.
Loading E:\E_Drive\TFS_Work\PlatformSoftware\Embedded\AutomatedRegressionTests\Main\bin\Debug\YDOA.dll...
Starting execution...
Results Top Level Tests
------- ---------------
Failed YDOA.InputOutputFeature.RelayAndRelayFdbkAsUsedNormalAndFALSEAndTRUE_01
Failed YDOA.InputOutputFeature.RelayAsUnusedNormalAndALLRelaysTRUE
0/2 test(s) Passed, 2 Failed
Summary
Test Run Failed.
Failed 2
Total 2
Results file: c:\TestResults\Admin_GE-6QSVBDRLU204 2015-07-08 16_10_38.trx
Test Settings: Default Test Settings
I have the reference "Microsoft.VisualStudio.QualityTools.UnitTestFramework" in my project.
mentioned is my AppConfig.
<specFlow>
<unitTestProvider name="MsTest"/>
<stepAssemblies>
In the SpecFlow - "Test Runner Tool", I have tried with all the options like : AUTO, ReSharper, VS2010MStest, VS2012, SpecRun....still I have the same problem.
I could not able to understand the problem.
Thanks,
Sai

Error while installing SQL Server 2012 Standard Edition

Here's how the error looks while the installation:
An error occurred during the setup process of the feature Attempted to
perform an unauthorized operation.
Clicking on Retry doesn't help, if I click on the Cancel button, it continues but then there will come up more errors like this one:
NOTE: I'm not using any VM, I'm using Windows 7 Ultimate 32 bit as my OS.
Here's the log details:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068119551
Start time: 2013-10-18 14:59:09
End time: 2013-10-18 16:02:02
Requested action: Install
Setup completed with required actions for features.
Troubleshooting information for those features:
Next step for SQLEngine: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for Replication: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for IS: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Machine Properties:
Machine name: H65617
Machine processor count: 4
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: ...)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered
Package properties:
Description: Microsoft SQL Server 2012 Service Pack 1
ProductName: SQL Server 2012
Type: RTM
Version: 11
SPLevel: 0
Installation location: F:\x86\setup\
Installation edition: Standard
Product Update Status:
None discovered.
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: false
AGTSVCACCOUNT: bezeq
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Manual
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSERVERMODE: MULTIDIMENSIONAL
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: <empty>
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Automatic
CLTCTLRNAME: <empty>
CLTRESULTDIR: <empty>
CLTSTARTUPTYPE: 0
CLTSVCACCOUNT: <empty>
CLTSVCPASSWORD: <empty>
CLTWORKINGDIR: <empty>
COMMFABRICENCRYPTION: 0
COMMFABRICNETWORKLEVEL: 0
COMMFABRICPORT: 0
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131018_144620\ConfigurationFile.ini
CTLRSTARTUPTYPE: 0
CTLRSVCACCOUNT: <empty>
CTLRSVCPASSWORD: <empty>
CTLRUSERS: <empty>
ENABLERANU: false
ENU: true
ERRORREPORTING: false
FEATURES: SQLENGINE, REPLICATION, BIDS, CONN, IS, BC, SDK, BOL, SSMS, ADV_SSMS, SNAC_SDK
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTSQLSERVERLICENSETERMS: false
INDICATEPROGRESS: false
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: <empty>
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: MSSQLSERVER
INSTANCENAME: MSSQLSERVER
ISSVCACCOUNT: ****
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
MATRIXCMBRICKCOMMPORT: 0
MATRIXCMSERVERNAME: <empty>
MATRIXNAME: <empty>
NPENABLED: 0
PID: *****
QUIET: false
QUIETSIMPLE: false
ROLE: <empty>
RSINSTALLMODE: DefaultNativeMode
RSSHPINSTALLMODE: DefaultSharePointMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: <empty>
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: SQL
SQLBACKUPDIR: <empty>
SQLCOLLATION: ****
SQLSVCACCOUNT: ****
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: ****
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: false
TCPENABLED: 1
UIMODE: Normal
UpdateEnabled: true
UpdateSource: MU
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131018_144620\ConfigurationFile.ini
Detailed results:
Feature: Management Tools - Complete
Status: Passed
Feature: Client Tools Connectivity
Status: Passed
Feature: Client Tools SDK
Status: Passed
Feature: Client Tools Backwards Compatibility
Status: Passed
Feature: Management Tools - Basic
Status: Passed
Feature: SQL Server Data Tools
Status: Passed
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x84BB0001
Error description: Attempted to perform an unauthorized operation.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0x6121810A%400x92D13C14&EvtType=0x6121810A%400x92D13C14
Feature: SQL Server Replication
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x84BB0001
Error description: Attempted to perform an unauthorized operation.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0x6121810A%400x92D13C14&EvtType=0x6121810A%400x92D13C14
Feature: Integration Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Integration Services
Component error code: 0x84BB0001
Error description: SSIS setup exception
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0x6121810A%400x92D13C14&EvtType=0x6121810A%400x92D13C14
Feature: SQL Browser
Status: Passed
Feature: Documentation Components
Status: Passed
Feature: SQL Writer
Status: Passed
Feature: SQL Client Connectivity
Status: Passed
Feature: SQL Client Connectivity SDK
Status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131018_144620\SystemConfigurationCheck_Report.htm
This also worked for me, however the path for Win7 is
C:/Users/[UserName]/AppData/Local/Microsoft_Corporation.
I deleted the contents in this folder, ran the SQL installation again as a repair and it ran clean. Nothing got recreated in the c:/Users/[UserName]/AppData/Local/Microsoft_Corporation folder.
I had the same experience trying to install SQLServer 2012 standard on Windows 8.1, I resolved it by deleting the folder "C:/Users/[UserName]/AppData/Microsoft_Corporation" and it worked, extracting the iso file into a local folder would help too .

Issue Signing InstallShield 2012 LE Installer Via Visual Studio 2012

I'm trying to sign my setup package from within InstallShield 2012LE in Visual Studio 2012. I have an MS Authenticode Cert from Symantec (VeriSign). There are two issues I'm seeing.
Firstly if I select Sign Output Files -> Setup.exe and Windows Installer Package (Or just windows installer package) visual studio crashes. Event Log shows two errors
Faulting application name: devenv.exe, version: 11.0.50727.1, time stamp: 0x5011ecaa
Faulting module name: WINTRUST.dll, version: 6.2.9200.16420, time stamp: 0x505a9691
Exception code: 0xc0000005
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 758017E4
Stack:
Also if I set "Use Software Identification Tag" to yes then I get the following error when trying to build the installer package.
Error 108 -1027: Failed signing TagCreatorID_EE17CD21-FE17-4342-8CA5-E0B993AAEB3E.swidtag
ISEXP : error : -1027: Failed signing TagCreatorID_EE17CD21-FE17-4342-8CA5-E0B993AAEB3E.swidtag
Has anyone come across these issues before and know of a workaround? It works fine is I turn off Software Identification Tag and only sign Setup.exe but I also require the options above. The certificate also signs all my DLLs and EXEs without issue.

Resources