Touch.Unit icon indicating copy to clipboard operation
Touch.Unit copied to clipboard

[CLI parser] mtouch arguments are not escaped properly

Open dodikk opened this issue 11 years ago • 0 comments

Some parameters may have spaces and specific symbols. For example, we have a device named "Igor’s iPad". The tests are not launched properly on it.

Steps :

  1. Rename your device to "Igor’s iPad"

  2. Install a test app on it

  3. Try launching it with TouchServer

mono Touch.Server.exe \
  --verbose           \
  --autoexit          \
  --port=16393        \
  --launchdev="your.app.bundle" \
  --devname="Igor’s iPad" \
  --logfile=UnitTestReport-Device-iOS8.xml

Actual result : The script hangs because of an unescaped input (see the log below)

Touch.Unit Simple Server Copyright 2011, Xamarin Inc. All rights reserved. User input for endpoint: 0.0.0.0:16393 Touch.Unit Simple Server listening on: 0.0.0.0:16393 [Command] mtouch --launchdev net.sitecore.MobileSDKUnitTestiOS --devname=Igor’s iPad -argument=-connection-mode -argument=none -argument=-app-arg:-autostart -argument=-app-arg:-autoexit -argument=-app-arg:-enablenetwork -argument=-app-arg:-hostport:16393 -argument=-app-arg:-hostname:10.38.10.236 ^Z

Expected Result The tests are launched on the device

dodikk avatar Oct 08 '14 15:10 dodikk