testacular /人缘跳过我的端到端测试 [英] testacular / karma skips my e2e test

查看:138
本文介绍了testacular /人缘跳过我的端到端测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题似乎之前已经回答,但链接不因为testacular组不存在了不再存在。即使我的适度搜索福技能,我无法找到任何提及跳过的测试中的角组。

This question seemed to have been answered before, but the link does not exist anymore because the testacular group doesn't exist anymore. Even with my moderate search-fu skills, I was not able to find any reference to skipped tests in the angular group.

在配置/卡玛 - e2e.js我的配置文件:

My config file in config/karma-e2e.js:

basePath = '../';

files = [
  JASMINE, JASMINE_ADAPTER,
  'app/assets/javascripts/v2/vendor/angular.1.0.5.js',
  'app/assets/javascripts/v2/vendor/angular-*.js',
  'karma/lib/angular/angular-scenario.js',
  'karma/lib/angular/angular-mocks.js',
  'app/assets/javascripts/v2/vendor/*.js',
  'app/assets/javascripts/v2/services/*.js',
  'app/assets/javascripts/v2/controllers/*.js',
  'app/assets/javascripts/v2/*.js',
  'karma/e2e/*.js'
];

autoWatch = true;

browsers = ['Chrome'];

singleRun = true;

proxies = {
  '/': 'http://localhost:3000/'
};

junitReporter = {
  outputFile: 'test_out/e2e.xml',
  suite: 'e2e'
};

我的应用程序正在担任了上(轨)端口3000我的测试尽可能简单。它看起来是这样的:

My app is being served up on (rails) port 3000. My test is as simple as possible. It looks like this:

'use strict';

describe("A suite", function() {
  beforeEach(function() {
    browser().navigateTo('/');
  });

  it("contains spec with an expectation", function() {
    expect(true).toBe(true);
  });
});

这个测试被跳过了!

[2013-03-30 22:35:28.945] [WARN] config - "/" is proxied, you should probably change urlRoot to avoid conflicts
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 26.0 (Mac)]: Connected on socket id GRDVn96Wxr7xEzxe8XjU
Chrome 26.0 (Mac): Executed 0 of 1 (skipped 1) SUCCESS (3.771 secs / 0 secs)

即使我用ddescribe或个人所得税,以尝试强制运行它,我还是被跳过。什么是由previous问题所引用的错误吗?

Even if I use ddescribe or iit, to try forcing to run it, I still gets skipped. What is the bug that was referenced by the previous question?

我使用的是业力0.8.0&安培;角的情况1.0.5。我能够从角种子运行端到端测试成功,所以我完全摸不着头脑。任何帮助将是AP preciated。谢谢你。

I'm using karma 0.8.0 & angular-scenario 1.0.5 . I was able to run the e2e tests from angular-seed successfully, so I'm totally puzzled. Any help would be appreciated. Thanks.

推荐答案

您应该从JASMINE亚军到ANGULAR_SCENARIO亚军改变。

You should change from the JASMINE runner to the ANGULAR_SCENARIO runner.

当您运行端到端测试的测试运行将连接到正在运行的网站,并依靠它来满足测试中的正确应用。它连接你的应用程序的各个部分可以由代理配置来控制。您需要提供与噶唯一的其他东西是场景运行程序和测试自己。

When you are running E2E tests the test runner will be connecting to your running site and relying on it to serve the proper application under test. Where it connects for various parts of your application can be controlled by the proxies config. The only other thing you need to provide Karma with are the scenario runner and tests themselves.

请注意:即使是在角的种子也为一个不同的配置端到端测试单元测试的。请注意,在端到端配置文件阵列的配置:

Note: even in angular-seed there is a different config for e2e tests and unit tests. Notice the config for the files array in the e2e config:

files = [
  ANGULAR_SCENARIO,
  ANGULAR_SCENARIO_ADAPTER,
  'test/e2e/**/*.js'
];

这篇关于testacular /人缘跳过我的端到端测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆