Calabash how to speed up execution time - calabash

I have a Android device connected to my PC.
Running a calabash test I use the following command:
calabash-android run <NAME>.apk features/<NAME>.feature
Now before running a feature Calabash always uploads the application again witch takes time.
How can I disable this?
Any help would be appreciated!
Thank you!

You can control the reinstallation of the app using the hooks file. This contains the cucumber hooks for before and after scenario. If you didn't make the hooks file that you are running then it's probably one from a sample project.
The bit you're looking for is the 'reinstall_apps' command. If you remove it completely then your app won't ever be reinstalled, which can be a bad thing as it's sometimes necessary to reset the app completely. The way I handle it is to tag the features where I do want the app reinstalled with #reinstall_app and then
Before do |scenario|
puts "Starting scenario - #{scenario.name}"
reinstall_app if scenario.source_tag_names.include?('#reinstall_app'))
...
end

Related

How do I make Drone OSS build anything?

I have built the Drone OSS using instructions at https://github.com/harness/drone/blob/master/BUILDING_OSS and successfully connected it to GitHub, it is triggering builds and I can log-in to the UI.
However, nothing happens after a build is triggered, the pipeline is stuck in Loading... and step does not execute.
Now this is not my first rodeo with Drone, I have the enterprise one running just fine, with runners connected and builds running fine. So I am relatively certain I don't have setup issues.
It is my understanding the OSS one does not support runners, and sure enough when runners try to connect to it they get 404 on the API endpoints they are trying to connect to.
So the question then is, how does one actually build anything with Drone OSS? what pipeline syntax / config must one use?
I am at a loss.
Solution: Start server with DRONE_AGENTS_DISABLED=true
Source: https://community.harness.io/t/drone-community-not-running-builds/11024/5

AWS Device Farm - Disable tutorials on devices

I am doing automated tests [Android / Appium Java JUnit] with the AWS Device Farm service, but they are interrupted by the use tutorials that appear on the devices, for example, the tutorial of how to use the camera. I want to know if there is a way to disable the tutorials of the use of the device. Thanks.
I work for the AWS Device Farm team.
We detected and root caused this issue where a one-time tutorial popup appears on some phone's camera apps. We've corrected it, so feel free to try again and let us know if this problem is still affecting you.
Looks like there is also a script you can run from this AWS forum post
https://forums.aws.amazon.com/thread.jspa?threadID=294719
Hi,
I'm so sorry this keeps happening to you. We do currently only have the dismissal running on some devices like the Samsung S9, and are going to be enabling it for other devices soon, in the coming weeks. What I can do now is provide you a script to verify that theyre dismissed yourself at the beginning of your test. If you're using "custom environment mode", add the following 2 lines to the pre-test section of your test spec file:
curl https://s3-us-west-2.amazonaws.com/aws-devicefarm-support/chrome_initialization_and_popup_detection.py -o chrome_initialization_and_popup_detection.py
- python chrome_initialization_and_popup_detection.py -v --retries 2 --output-dir $DEVICEFARM_TEST_PACKAGE_PATH/popup_dismissal
This will run our popup dismissal script in your own code to verify that any device you run on gets all popups dismissed. It shouldn't be necessary for some devices like the S9, but just in case any do happen to creep up, this will dismiss them for you. I'll also double-check on our end why some popups like the S9 popup aren't getting dismissed properly.

Can I run a process from my process without becoming its parent?

I have a somewhat strange request. Let me explain. I recently run into an issue when I needed to display my screensaver's configuration window by running the following command:
"C:\Windows\System32\mysvr.scr" /c
The problem is that my parent GUI application that calls it runs with High Mandatory Integrity Level, or S-1-16-12288, and due to this, when I run the following command via CreateProcess API the screensaver configuration (evidently?) tries to communicate with my app and fails because of its high integrity level.
So I'm trying to bypass this by having some other process run this command for me. I looked into possibly using RunDll32 but I don't know an API that I can use through it to start a process.
Any ideas?

Unable to debug glassware- Google glass

I am unable to debug glassware.I have tried the solution in this thread How to debug Google Glass GDK application?
This application uses voice commands, It gets installed but doesn't start the default activity.I am unable to find any classes to select in the run configurations.But messages are logged in Log cat.
Update:By activating DDMS I am able to debug.. But its strange that after few times of debugging, app stops working .. I dont get any exceptions logged.
You generally don't setup a default activity for Glass since there's not a way to "run" a specific application. You will likely want to set up a voice command and add a listener for that voice command. This is how your application will launch.
Even with no exceptions, could you post your LogCat output? This might help to shed a little more light on the issues you're having. I've been able to debug applications without any issues, so I know it's possible.

CruiseControl.NET run as a windows service and as a standalone process behaves differently

I have a project that is being built using CruiseControl.NET. The project contains an 'MSBuild task' that runs the build for the project and also the unit tests. The unit test in turn is just a MSBuild 'exec' task that runs an executable.
The unit test involves some .NET remoting. And when the unit tests are run through the system command prompt, the software's window opens up, tests run and the process exits.
When I force a build through the web dashboard, the build hangs at the point where the unit test starts running. The software's window does not open up, but the executable is running. If the process is killed through the task explorer, the build goes through with a 'Failure' status. This happens when I run ccnet as a windows service.
If I run CCNet directly (not as a windows service) and force a build through the web dashboard, the build and unit tests go through fine as expected. (with the window of the software opening up.)
It looks like there is a deadlock in the case where CCNet is run as a windows service. I am guessing it is related to the standard output/error streams.
Is this is known problem?
What might be the problem going on?
Any suggestions on debugging this?
How can I get around it?
(I am using CCNet version 1.4.4 SP1)
When CCNet is running as a service it is not going to have access to the display, so don't expect to see anything on the screen in this configuration. The first thing I would check is the permissions - make sure the service runs as an account that has permissions to access whatever resources you need. You also have CCNet log files, which you can find via Dashboard.
On a side note, try TeamCity instead of CCNet, its 10 years ahead.
Maybe this answer will help :
delphi windows service can't download file from internet
You should know that when running CCNet as an application (the dosbox) it uses the environment variables and all rights from the logged account. So it may connect to a server, use cached passwords, get registry variables for this account.
BUT when ran as a service, the account is the one you provided : LocalSystem for exampe, where env. varibales are not the same.
So, what you can do is to change the CCNet service account for test. Change it to your user account (with password), and I'm sure it will work better !