How can I run a Xamarin.UITest from the commandline? - testing

I would like to run tests (made using Xamarin.UITest) on my build server, which runs TeamCity on OS X.
I have searched online on how to do this, but I am only able to find how these tests can be submitted to Xamarin Test Cloud. This is not what I want, I want to run the tests I wrote directly on devices (and/or simulators) connected to the build server.

according to the docs (requires NUnit 2.6.3)
$ mono <path-to>/Nunit-2.6.3/bin/nunit-console.exe <path/to/uitest-assembly.dll>

Here is what I do on OS-X:
Locally install the correct nunit-console.exe version
Build the app
Build the uitests
Run the tests
Example:
nuget install NUnit.Runners -Version 2.6.4
xbuild iOS/UITestFromCmdLine.iOS.csproj /target:Build
xbuild UITests/UITestFromCmdLine.UITests.csproj
mono ./NUnit.Runners.2.6.4/tools/nunit-console.exe UITests/bin/Debug/UITestFromCmdLine.UITests.dll

Related

Mobilefirst-8.0 Platform Using Eclipse Development

I am trying to put sample for MFP-8.0 Apps and i follow that below links & video,
https://mobilefirstplatform.ibmcloud.com/blog/2016/06/17/ibm-mobilefirst-studio-8-0-plugin-for-eclipse-now-available/
This is error message i got from eclipse console.
E:\POC\MFP-8.0\MFP\SampleTest\www>mfpdev app register --noprompt
E:\POC\MFP-8.0\MFP\SampleTest\www>exit
'mfpdev' is not recognized as an internal or external command,
operable program or batch file.
If anything i missed out for above the tutorial what else i have to do? kindly any one advice me.
System environment : Windows 8.1,Eclipse Mars, Java 1.8
Thanks
If it doesn't know what "mfpdev" is, it sounds like then that you do not have the MobileFirst CLI installed.
Make sure you have nodejs installed, then from command line run the following command: npm install -g mfpdev-cli, which will install the CLI.
The Studio plug-in relies on the CLI installed, since behind-the-scenes it calls CLI commands.

Bamboo can't execute a command starting with "./" after upgrading to 5.4

Bamboo is running on a Windows Server 2008 box.
We were on Bamboo 5.0.1 and I upgraded to 5.4.3. We have several jobs using Grails Wrapper and Gradle Wrapper. There are Executables registered in Bamboo of ./grailsw and ./gradle. These worked perfectly on the old version but after the upgrade the jobs are failing with the following error:
Failing task since return code of [./gradlew clean build] was -1 while expected 0
I've tried changing ./ to .\ and removing it entirely and all of those fail with the same message above. If I cd into the build directory and run the command with either .\ or just gradlew then it works fine.
When I'm running these commands I'm logged in as the same user that the service is running.
Thanks!
I contacted Atlassian Support about this issue and it was discovered that if you're using the newer version of Bamboo on Windows it won't execute a file that doesn't have an extension.

installing phonegap on windows7 error

I am a web developer and new to Phonegap..
I was trying to install phone gap on my windows 7 machine as per described here
http://docs.phonegap.com/en/3.1.0/guide_cli_index.md.html#The%20Command-line%20Interface
but when i run the following command
cordova platform add android
i am getting the following error
[Error: An error occured during creation of android sub-project.
ERROR : executing command 'ant', make sure you have ant installed and added to y
our path.
]
does this mean that i should install apache ant on my machine ? if so can someone redirect me to right link.
I am also running wampserver on my machine for my other developments..
will installing 'ant' affect on my wamp ?
As described in PhoneGap Getting Started
Finally, you may need to include %ANT_HOME%\bin to your PATH as well. To check to see if this is required, run a command prompt and type ant. If the program can not be found add %ANT_HOME%\bin to the PATH. You may need to specify the full path instead of using the %ANT_HOME% environment variable.
If you need ant for Windows, you may want to download and install it from here
You need ant to add the android platform.
Ant is a java-based build tool.
You can get further informations and download it at http://ant.apache.org.
ant has nothing to do with the apache webserver and doesn't effect your wamp installation. It's another software product provided by the apache foundation.
lg
fastrde

An after-build copy command compatible with Windows and Linux at the same time

I'm developing C# using Mono and MonoDevelop in Windows and Ubuntu. I might code the same project in Windows today and tomorrow in Ubuntu (which is why I chose Mono and MonoDevelop).
In project properties I need to add some After Build commands to copy some projects compiled files into some alternate folders. And I've done this like so:
cp ${TargetFile} ${SolutionDir}/SomePorject/bin/${ProjectConfigName}/Plugins
While this command works perfectly in my Ubuntu machine, each time I'm using Windows my Build requests get canceled since this command can not be executed in Windows (there's no cp in Windows). It makes this a pain to switch between Ubuntu and Windows since each time I need to change these commands.
Now my question is, is there a copy command which works in Windows and Ubuntu alike? Or maybe MonoDevelop has come up with a copy command of its own which works according to the OS it is running under!
I think "configurations" is your way to go.
Create separate configurations for each platform (Right click on solution -> options -> configurations). After that, in "Custom commands" create two "After Build" commands, one for Windows, and other for Ubuntu.
When you build solution just choose your platform from your configurations.
You could install cygwin on your Windows box.

MonoDevelop command line compile a solution

The problem is as follows: I have a MonoDevelop project (ASP.NET) on my development workstation.
I'm currently at a customer site, without my regular development environment on my laptop (Regulatory Burden). I have SSH access to my development workstation, but the network is too laggy to handle X11 comfortably.
I need to make a minor adjustment and recompile. I tried using xbuild, with no effect:
qdot#trigati ~/svn/proj/trunk/proj $ xbuild proj.csproj
XBuild Engine Version 2.6.4.0
Mono, Version 2.6.4.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2009.
MSBUILD: error MSBUILD0000: /home/qdot/svn/proj/trunk/proj/proj.csproj: Imported project:
"/usr/lib/mono/xbuild/Microsoft/VisualStudio/v8.0/WebApplications/Microsoft.WebApplication.targets" does not exist.
Is there some utility that can trigger a rebuild of the monodevelop sourcecode? Obviously the code builds through the GUI.
mdtool build proj.csproj
If you want to use xbuild, create a symlink:
cd /usr/lib/mono/xbuild/Microsoft/VisualStudio/v9.0
ln -s v9.0 v10.0
I have the same exact ubuntu 12.04 distro on two different computers and could not figure out why mono would compile on one computer and not the other. But oh well, symlink solved the problem.