Protractor TeamCity+;量角器不';我不能真正执行

Protractor TeamCity+;量角器不';我不能真正执行,protractor,teamcity,Protractor,Teamcity,如果我使用以下测试设置在本地运行测试,一切都会正常运行。然而,当我在teamcity服务器上运行测试时,量角器测试在不到一秒的时间内就通过了,并且所有测试都通过了。似乎没有任何承诺会得到解决,基本上测试什么都不做。但是,如果我添加非异步断言 except(1).toBe(2); 它失败,错误报告正确 测试1.ps1: [CmdLetBinding()] Param() $env:path += ";C:\Program Files (x86)\Microsoft SDKs\Azure\Sto

如果我使用以下测试设置在本地运行测试,一切都会正常运行。然而,当我在teamcity服务器上运行测试时,量角器测试在不到一秒的时间内就通过了,并且所有测试都通过了。似乎没有任何承诺会得到解决,基本上测试什么都不做。但是,如果我添加非异步断言

except(1).toBe(2);
它失败,错误报告正确

测试1.ps1:

[CmdLetBinding()]
Param()

$env:path += ";C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\"

Push-Location $PSScriptRoot\..\

"Starting azure table storage emulator."
if (AzureStorageEmulator.exe status | select-string "IsRunning: False") {
    AzureStorageEmulator.exe start
}

"Clearing existing data from storage."
AzureStorageEmulator.exe clear all

"Running server side tests."
dnx test

"Protractor"
Get-Process -Name *chrome* | Stop-Process
$handle = Start-Process -FilePath "dnx" -ArgumentList "web-e2e" -PassThru

try {
    $results = gulp protractor
    $results

    if($results | select-string "error code") {
        throw "Protractor test failed."
    }
}
finally {
    try {
        $handle.Kill()
    } catch {}
    Get-Process -Name *chrome* | Stop-Process
}
Pop-Location
吞咽任务:

gulp.task('protractor', (cb) => {
    child_process.exec(`node ${__dirname}\\node_modules\\protractor\\lib\\cli.js .\\protractor\\protractor.conf.js --directConnect`, (err, stdout, stderr) => {
        console.log(stdout);
        console.log(stderr);
        cb(err);
    });
});
progrator.conf:

exports.config = {
  framework: 'jasmine',
  specs: ['**/*.spec.js'],
  directConnect: true,
  baseUrl: 'http://localhost:5000/'
};
团队城市日志:

[20:15:15][Step 2/2] Using ChromeDriver directly...
[20:15:15][Step 2/2] [launcher] Running 1 instances of WebDriver
[20:15:15][Step 2/2] Started
[20:15:15][Step 2/2] ...................
[20:15:15][Step 2/2] 
[20:15:15][Step 2/2] 
[20:15:15][Step 2/2] 19 specs, 0 failures
[20:15:15][Step 2/2] Finished in 0.82 seconds
[20:15:15][Step 2/2] [launcher] 0 instance(s) of WebDriver still running
[20:15:15][Step 2/2] [launcher] chrome #1 passed
我在显式中断异步时进行了测试,除了(例如,将元素id更改为无意义)。它在本地失败,在TC上仍然通过

我有点被困在这里,可能是直接连接导致了后面的问题,但它也使安装更简单。

这可能有助于调查TeamCity中构建失败的原因。