зеркало из https://github.com/microsoft/appium.git
don't show appium logging in console during tests
This commit is contained in:
Родитель
8b23ba9d86
Коммит
80f1e4f956
|
@ -8,6 +8,9 @@ var routing = require('./routing')
|
|||
|
||||
var Appium = function(args) {
|
||||
this.args = args;
|
||||
if (!this.args.verbose) {
|
||||
logger.transports.console.level = 'warn';
|
||||
}
|
||||
this.rest = null;
|
||||
this.devices = {};
|
||||
this.active = null;
|
||||
|
|
|
@ -6,14 +6,14 @@ var _ = require("underscore")
|
|||
, path = require('path')
|
||||
, spawn = require('child_process').spawn;
|
||||
|
||||
module.exports.startAppium = function(appName, readyCb, doneCb) {
|
||||
module.exports.startAppium = function(appName, verbose, readyCb, doneCb) {
|
||||
var app = (fs.existsSync(appName)) ? appName:
|
||||
path.resolve(__dirname,
|
||||
"./sample-code/apps/"+appName+"/build/Release-iphonesimulator/"+appName+".app");
|
||||
return server.run({
|
||||
app: app
|
||||
, udid: null
|
||||
, verbose: true
|
||||
, verbose: verbose
|
||||
, port: 4723
|
||||
, address: '127.0.0.1'
|
||||
, remove: true }
|
||||
|
@ -24,7 +24,7 @@ module.exports.startAppium = function(appName, readyCb, doneCb) {
|
|||
|
||||
module.exports.runTestsWithServer = function(grunt, appName, testType, cb) {
|
||||
var exitCode = null;
|
||||
server = module.exports.startAppium(appName, function() {
|
||||
server = module.exports.startAppium(appName, false, function() {
|
||||
module.exports.runMochaTests(grunt, testType, function(code) {
|
||||
server.close();
|
||||
exitCode = code;
|
||||
|
|
2
grunt.js
2
grunt.js
|
@ -52,7 +52,7 @@ module.exports = function(grunt) {
|
|||
if (typeof appName === "undefined") {
|
||||
appName = "TestApp";
|
||||
}
|
||||
startAppium(appName, function() {}, this.async());
|
||||
startAppium(appName, true, function() {}, this.async());
|
||||
});
|
||||
grunt.registerTask('mobileSafari', "Start the Appium server with MobileSafari", function(version) {
|
||||
if (typeof version === "undefined") {
|
||||
|
|
|
@ -27,7 +27,9 @@ var main = function(args, readyCb, doneCb) {
|
|||
|
||||
rest.use(express.favicon());
|
||||
rest.use(express.static(path.join(__dirname, '/app/static')));
|
||||
rest.use(express.logger('dev'));
|
||||
if (args.verbose) {
|
||||
rest.use(express.logger('dev'));
|
||||
}
|
||||
rest.use(parserWrap);
|
||||
rest.use(express.methodOverride());
|
||||
rest.use(rest.router);
|
||||
|
|
Загрузка…
Ссылка в новой задаче