【发布时间】:2013-03-08 23:14:59
【问题描述】:
enter code here因为我无法让通过/失败日志记录与 4.6 版本的 Instruments 一起正常工作,所以我正在尝试使用 tuneup.js 库,但每当我尝试运行时,我都会收到以下错误测试:
Can't find variable: test
代码如下:
//We want to use the tuneup library to add extra capabilities
#import <tuneup_js/tuneup.js>
#import <tuneup_js/test.js>
var target = UIATarget.localTarget();
var target = UIATarget.localTarget();
var app = UIATarget.localTarget().frontMostApp();
test("Test1", function(target, app) {
//Do UI automation stuff
var titleDisplayed = tableView.cells()[0].name();
var StoryName = "My Dogs!";
UIALogger.logMessage("My Story Title: " + titleDisplayed);
UIALogger.logMessage("Innocuous Message-1.");
assertEquals(titleDisplayed, StoryName);
}); // <------Error points to this line!
//End test
知道我做错了什么吗? tuneup.js 库位于名为 tuneup_js 的文件夹中,该文件夹位于包含我的测试脚本(一个 Instruments 跟踪文件)的目录的根目录中,并且在启动时我没有收到任何导入错误。
【问题讨论】:
标签: xcode instruments ios-ui-automation