Otomatik GUI sınamaları elde etmek için UIAutomation
çerçevesini kullanabilirsiniz. Bu kesinlikle komut satırından değil, Araçlar aracı üzerinden Javascript komut dosyalarını çalıştırıyorsunuz. Monotouch ile mükemmel bir şekilde çalışıyor (her zaman kullandığım zaman).
The apple documentation on UIAutomation is pretty in depth; and hopefully should cover everything else you need.
Credit to jacksonh from Gist for this script; shamelessly taken from there).
var target = UIATarget.localTarget();
var window = UIATarget.localTarget().frontMostApp().mainWindow();
var table = window.tableViews() [0];
var results_cell = table.cells() [0]
var run_cell = table.cells() [1];
var passed = false;
var results = '';
run_cell.tap();
while (true) {
target.delay (5);
try {
results = results_cell.name();
} catch (e) {
UILogger.logDebug ('exception');
continue;
}
if (results.indexOf ('failure') != -1) {
passed = false;
break;
}
if (results.indexOf ('Success!') != -1) {
passed = true;
break;
}
}
UIALogger.logDebug ('Results of test run: ' + results);
UIALogger.logDebug ('Passed: ' + passed);
bunu mu komut satırından olmak zorunda mıdır? Herhangi bir komut dosyası, bir kez yazdıkları sürece, birkaç kez (ve tam olarak otomatik olarak) çalışır mı? – Luke