App Center test cases getting failed throwing error "shel': Error while starting {"message"=>"Waited for Calabash server on 37282. Did not launch."," - calabash

I am using Xamarin UITest 2.2.6 (Tried downgrading the version to 2.2.4 & 2.2.5).
I can sucessfully run my tests on my local machine.
We are not using calabash package dependency anywhere in our project.
While running my tests on App Center we are getting below error on App Center:
SetUp : System.Exception : Failed to execute:
/Volumes/Data/xamarin/pipeline/versions/47ce72b23d7ff4d03244dfc4945dbf7b9c9d701a/adt/sdk/platform-tools/adb
shell am instrument -e "target_package" "com.hargray.MobileGuide" -e
"main_activity" "null" -e "debug" "false" -e "test_server_port"
"37777" -e "class"
"sh.calaba.instrumentationbackend.InstrumentationBackend"
com.hargray.MobileGuide.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
- exit code: 1/Volumes/Data/xamarin/pipeline/versions/47ce72b23d7ff4d03244dfc4945dbf7b9c9d701a/adt/sdk/platform-tools/adb:407:
warning: already initialized constant ARGVParse am instrument -e
target_package com.hargray.MobileGuide -e main_activity null -e debug
false -e test_server_port 37777 -e class
sh.calaba.instrumentationbackend.InstrumentationBackend
com.hargray.MobileGuide.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner{:instrumentation=>"com.hargray.MobileGuide.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner",
:instrumentation_name=>"sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :main_activity=>"null",
:class=>"sh.calaba.instrumentationbackend.InstrumentationBackend",
:target_package=>"com.hargray.MobileGuide",
:package_name=>"com.hargray.MobileGuide.test"}Parse am instrument -e
target_package com.hargray.MobileGuide -e main_activity null -e debug
false -e test_server_port 37777 -e class
sh.calaba.instrumentationbackend.InstrumentationBackend
com.hargray.MobileGuide.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner{:instrumentation=>"com.hargray.MobileGuide.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner",
:instrumentation_name=>"sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :main_activity=>"null",
:class=>"sh.calaba.instrumentationbackend.InstrumentationBackend",
:target_package=>"com.hargray.MobileGuide",
:package_name=>"com.hargray.MobileGuide.test"}/Volumes/Data/xamarin/pipeline/versions/47ce72b23d7ff4d03244dfc4945dbf7b9c9d701a/adt/sdk/platform-tools/adb:117:in
`shel': Error while starting {"message"=>"Waited for Calabash server
on 37282. Did not launch.",
"device_id"=>"e1569682-22a4-475c-b747-d45568eb827a",
"error_code"=>104}, 503, {"message":"Waited for Calabash server on
37282. Did not launch.","device_id":"e1569682-22a4-475c-b747-d45568eb827a","error_code":104}.
(RuntimeError)

Related

how to have 2 output of newman with single execution

Given the following scenario:
execute collections using newman, and save it in a reportfile but meanwhile also put the standard output of the the newman so that we can see in details. (like executing normally, without saving to any report file).
So my problem is when executing the newman with option save it to a reportfile, it seems redirecting the standard output and convert it to a report file. During this execution I see nothing in the standard output at all.
As of now I can do this in two step which seems a bit unprofessional.
inside of:
ExecutePostmanCollection.ps1
...
newman run $collection -e $env --insecure -r junitfull --reporter-junitfull-export $result
...
newman run $collection -e $env --insecure --disable-unicode | Out-File -FilePath "./output.txt"
Get-Content "./output.txt"
Thank you and
Regards
CP
use cli reporter.
newman run $collection -e $env --insecure -r cli,junitfull --reporter-junitfull-export $result ...
newman run $collection -e $env --insecure -r cli --disable-unicode | Out-File -FilePath "./output.txt" Get-Content "./output.txt"

Script execution using ansible [duplicate]

I am using Ansible to deploy my project and I trying to check if an specified package is installed, but I have a problem with it task, here is the task:
- name: Check if python-apt is installed
command: dpkg -l | grep python-apt
register: python_apt_installed
ignore_errors: True
And here is the problem:
$ ansible-playbook -i hosts idempotent.yml
PLAY [lxc-host] ***************************************************************
GATHERING FACTS ***************************************************************
ok: [10.0.3.240]
TASK: [idempotent | Check if python-apt is installed] *************************
failed: [10.0.3.240] => {"changed": true, "cmd": ["dpkg", "-l", "|", "grep", "python-apt"], "delta": "0:00:00.015524", "end": "2014-07-10 14:41:35.207971", "rc": 2, "start": "2014-07-10 14:41:35.192447"}
stderr: dpkg-query: error: package name in specifier '|' is illegal: must start with an alphanumeric character
...ignoring
PLAY RECAP ********************************************************************
10.0.3.240 : ok=2 changed=1 unreachable=0 failed=0
Why is illegal this character '|' .
From the doc:
command - Executes a command on a remote node
The command module takes the command name followed by a list of
space-delimited arguments. The given command will be executed on all
selected nodes. It will not be processed through the shell, so
variables like $HOME and operations like "<", ">", "|", and "&" will
not work (use the shell module if you need these features).
shell - Executes a commands in nodes
The shell module takes the command name followed by a list of space-delimited arguments.
It is almost exactly like the command module but runs the command
through a shell (/bin/sh) on the remote node.
Therefore you have to use shell: dpkg -l | grep python-apt.
read about the command module in the Ansible documentation:
It will not be processed through the shell, so .. operations like "<", ">", "|", and "&" will not work
As it recommends, use the shell module:
- name: Check if python-apt is installed
shell: dpkg -l | grep python-apt
register: python_apt_installed
ignore_errors: True
For what it's worth, you can check/confirm the installation in a debian environment using the apt command:
- name: ensure python-apt is installed
apt: name=python-apt state=present

Apollo GraphQL iOS

I add this run script on my swift3 project
APOLLO_FRAMEWORK_PATH="$(eval find $FRAMEWORK_SEARCH_PATHS -name "Apollo.framework" -maxdepth 1)"
if [ -z "$APOLLO_FRAMEWORK_PATH" ]; then
echo "error: Couldn't find Apollo.framework in FRAMEWORK_SEARCH_PATHS; make sure to add the framework to your project."
exit 1
cd "${SRCROOT}/${TARGET_NAME}"
$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-codegen.sh generate '/*.graphql' --schema schema.json --output API.swift
When I build I get this error:
find: /Users/userName/Documents/Swift: No such file or directory
find: Apps/appName/appName: No such file or directory
find: /Users/userName/Documents/Swift: No such file or directory
find: Apps/appName/Carthage/Build/iOS: No such file or directory
++ exec apollo-codegen generate '/*.graphql' --schema schema.json --output API.swift
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
with the following versions
- Apollo (0.8.0):
- Apollo/Core (= 0.8.0)
- Apollo/Core (0.8.0)
I had to change
$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-codegen.sh
to:
$APOLLO_FRAMEWORK_PATH/Resources/check-and-run-apollo-codegen.sh

Vagrant VM not getting Django and others requirements

I'm using Vagrant and Chef solo to setup my django dev environment. Using Chef Solo I successfully install my packages (vim, git, apt, python, mysql) but then when I setup my project using pip to download/install my requirements (django, south, django-registration, etc), these ones are not correctly downloaded/found in my fresh VM.
I'm not sure if it's a location issue, but it's downloading and I have only warnings, never errors, but then it's not at the supposed location (I have another project setup exactly the same and it works, so maybe I'm missing something here...).
Here is my Vagrantfile:
Vagrant::Config.run do |config|
config.vm.define :djangovm do |django_config|
# Every Vagrant virtual environment requires a box to build off of.
django_config.vm.box = "lucid64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
django_config.vm.box_url = "http://files.vagrantup.com/lucid64.box"
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
django_config.vm.forward_port 80, 8080
django_config.vm.forward_port 8000, 8001
# Enable provisioning with chef solo, specifying a cookbooks path (relative
# to this Vagrantfile), and adding some recipes and/or roles.
django_config.vm.provision :chef_solo do |chef|
chef.json = {
python: {
install_method: 'source',
version: '2.7.5',
checksum: 'b4f01a1d0ba0b46b05c73b2ac909b1df'
},
mysql: {
server_root_password: 'root',
server_debian_password: 'root',
server_repl_password: 'root'
},
}
chef.cookbooks_path = "vagrant_resources/cookbooks"
chef.add_recipe "apt"
chef.add_recipe "build-essential"
chef.add_recipe "git"
chef.add_recipe "vim"
chef.add_recipe "openssl"
chef.add_recipe "mysql::client"
chef.add_recipe "mysql::server"
chef.add_recipe "python"
end
django_config.vm.provision :shell, :path => "vagrant_resources/vagrant_bootstrap.sh"
end
end
And here the bootstrap file to download Django and continue setting up things:
#!/usr/bin/env bash
eval vagrantfile_location="~/.vagrantfile_processed"
if [ -f $vagrantfile_location ]; then
echo "Vagrantfile already processed. Exiting..."
exit 0
fi
#==================================================================
# install dependencies
#==================================================================
/usr/bin/yes | pip install --upgrade pip
/usr/bin/yes | pip install --upgrade virtualenv
/usr/bin/yes | sudo apt-get install python-software-properties
#==================================================================
# set up the local dev environment
#==================================================================
if [ -f "/home/vagrant/.bash_profile" ]; then
echo -n "removing .bash_profile for user vagrant..."
rm /home/vagrant/.bash_profile
echo "done!"
fi
echo -n "creating new .bash_profile for user vagrant..."
ln -s /vagrant/.bash_profile /home/vagrant/.bash_profile
source /home/vagrant/.bash_profile
echo "done!"
#==================================================================
# set up virtual env
#==================================================================
cd /vagrant;
echo -n "Creating virtualenv..."
virtualenv myquivers;
echo "done!"
echo -n "Activating virtualenv..."
source /vagrant/myquivers/bin/activate
echo "done!"
echo -n "installing project dependencies via pip..."
/usr/bin/yes | pip install -r /vagrant/myquivers/myquivers/requirements/dev.txt
echo "done!"
#==================================================================
# install front-endy things
#==================================================================
echo -n "adding node.js npm repo..."
add-apt-repository ppa:chris-lea/node.js &> /dev/null || exit 1
echo "done!"
echo -n "calling apt-get update..."
apt-get update &> /dev/null || exit 1
echo "done!"
echo -n "nodejs and npm..."
apt-get install nodejs npm &> /dev/null || exit 1
echo "done!"
echo -n "installing grunt..."
npm install -g grunt-cli &> /dev/null || exit 1
echo "done!"
echo -n "installing LESS..."
npm install -g less &> /dev/null || exit 1
echo "done!"
echo -n "installing uglify.js..."
npm install -g uglify-js &> /dev/null || exit 1
echo "done!"
#==================================================================
# cleanup
#==================================================================
echo -n "marking vagrant as processed..."
touch $vagrantfile_location
echo "done!"
My requirements dev.txt looks like this:
Django==1.5.1
Fabric==1.7.0
South==0.8.2
Pillow==2.1.0
django-less==0.7.2
paramiko==1.11.0
psycopg2==2.5.1
pycrypto==2.6
wsgiref==0.1.2
django-registration==1.0
Any idea why I can't find Django and my other things in my VM?
This is a whole 'nother path, but I highly recommend using Berkshelf and doing it the Berkshelf way. There's a great guide online for rolling them this way.
That is, create a cookbook as a wrapper that will do everything your script does.
So the solution was to remove the dependency with Postgre psycopg2==2.5.1 I have in my requirements (from the setup in my other project), because here I'll be having a MySQL database instead.

Boost.python error in hello world example

I keep getting the error when I try to compile the hello world example with bjam. Everything in Jamroot file ran ok, except the last line (when I commented this line, no error happens):
run-test hello : hello_ext hello.py ;
The error is:
capture-output bin/hello.test/gcc-4.5.2/debug/hello
export: 3: LD_LIBRARY_PATH: bad variable name
LD_LIBRARY_PATH=/home/hoangtu/Programs/boost_1_46_1/bin.v2/libs/python/build/gcc-4.5.2/debug:/home/hoangtu/Programs/boost_1_46_1/libs/python/example/tutorial/bin/gcc-4.5.2/debug:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PYTHONPATH=bin/gcc-4.5.2/debug
export PYTHONPATH
"/usr/bin/python2.7" "hello.py" > "bin/hello.test/gcc-4.5.2/debug/hello.output" 2>&1
status=$?
echo >> "bin/hello.test/gcc-4.5.2/debug/hello.output"
echo EXIT STATUS: $status >> "bin/hello.test/gcc-4.5.2/debug/hello.output"
if test $status -eq 0 ; then
cp "bin/hello.test/gcc-4.5.2/debug/hello.output" "bin/hello.test/gcc-4.5.2/debug/hello"
fi
verbose=0
if test $status -ne 0 ; then
verbose=1
fi
if test $verbose -eq 1 ; then
echo ====== BEGIN OUTPUT ======
cat "bin/hello.test/gcc-4.5.2/debug/hello.output"
echo ====== END OUTPUT ======
fi
exit $status
...failed capture-output bin/hello.test/gcc-4.5.2/debug/hello...
...failed updating 1 target...
...skipped 1 target...
I had encountered similar problem during building adobe asl library. The problem was the version of installed from ubuntu repositories bjam (3.1.16). After installing latest bjam from sourceforge (3.1.18), everything worked as it should.
PS. OS is Ubuntu 11.04