首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >没有发现茉莉花测试

没有发现茉莉花测试
EN

Stack Overflow用户
提问于 2015-01-12 19:22:49
回答 1查看 2.2K关注 0票数 2

我有通过Chutzpah上下文菜单扩展运行的茉莉测试(运行JS测试)。但是,测试资源管理器没有发现它们,当我右键单击并选择Run时,来自“测试”的输出将给出如下结果:

代码语言:javascript
复制
System.ArgumentException: The directory name  is invalid.
   at System.IO.FileSystemWatcher..ctor(String path, String filter)
   at Chutzpah.VS11.EventWatchers.TestFilesUpdateWatcher.AddWatch(String path)
   at Chutzpah.VS2012.TestAdapter.ChutzpahTestContainerDiscoverer.UpdateTestContainersAndFileWatchers(IEnumerable`1 files, Boolean isAdd)
   at Chutzpah.VS2012.TestAdapter.ChutzpahTestContainerDiscoverer.GetTestContainers()
   at Chutzpah.VS2012.TestAdapter.ChutzpahTestContainerDiscoverer.get_TestContainers()
   at Microsoft.VisualStudio.TestWindow.Controller.TestContainerDiscovererExtension.GetSortedContainers(ITestContainerDiscoverer discoverer)
   at Microsoft.VisualStudio.TestWindow.Controller.TestContainerProvider.GetContainersFromDiscoverer(ITestContainerDiscoverer discoverer)
No tests found to run.

这里还有我的chutzpah.json文件:

代码语言:javascript
复制
{
    "Framework": "jasmine",
    "FrameworkVersion": "2",
    "TestHarnessLocationMode": "SettingsFileAdjacent",
    "References": [
        { "Path": "../../DIB.MemberCatalog/lib/dust/dust-full.js" },
        { "Path": "../../DIB.MemberCatalog/lib/dust-helpers/dust-helpers.js" },
        { "Path": "../../DIB.MemberCatalog/lib/harvey/harvey.js" },
        { "Path": "../../DIB.MemberCatalog/lib/hopscotch/js/hopscotch.js" },
        { "Path": "../../DIB.MemberCatalog/lib/jquery/jquery-1.11.1.js" },
        { "Path": "../../DIB.MemberCatalog/lib/jquery-ui/jquery-ui.js" },
        { "Path": "../../DIB.MemberCatalog/lib/jquery-validate/jquery.validate.js" },
        { "Path": "../../DIB.MemberCatalog/lib/knockout/knockout-3.1.0.js" },
        { "Path": "../../DIB.MemberCatalog/lib/knockout-mapping/knockout.mapping.js" },
        { "Path": "../../DIB.MemberCatalog/lib/knockout-validation/knockout.validation.js" },
        { "Path": "../../DIB.MemberCatalog/lib/lightbox/js/lightbox.js" },
        { "Path": "../../DIB.MemberCatalog/lib/respond/respond.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/jquery.qtip.min.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/json2.min.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/jquery.cookie.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/jquery.hoverIntent.min.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/jquery.lazyload.min.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/changecheck.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/stickytable.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/superalert.js" },
        { "Path": "../../DIB.MemberCatalog/Scripts/core.js" },

        { "Path": "prepare.js" },
        { "Path": "engine.js" }
    ],

    "Tests": [
        { "Path": "tests" }
    ],

    "CodeCoverageIncludes": [],
    "CodeCoverageExcludes": []
}

Solution structure:
DIB.MemberCatalog
  -Testing
    - DIB.MemberCatalog.Tests.JS
      - data
      - lib
        - jasmine-2.0.0
          - (jasmine files, boot, console, jasmine)
      - tests
        - testfiles.js
      - chutzpah.json
  -DIB.MemberCatalog
    - (more...)

我在网上搜索了一下,找不到解决办法。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-12 21:39:04

通过将我的测试项目名从DIB.MemberCatalog.Tests.JS更改为DIB.MemberCatalog.Tests.Client来解决。当项目在项目名称的末尾有javascript文件扩展名时,就会出现混乱。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27909244

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档