Can i check emulator is running and one specific application is insatlled in emulator or not? - unit-testing

I am new at mobile automation testing and now i want to create a one type of framework for android application testing that in before method it will check for if emualtor is ruuning or not? if not then launch the emulator and second specific application is installed or not(example: facebook) if facebook is installed then launch that application.
I am using appium for testing. Can any one suggest me what shuold i have to do?
Thank you in advanced.

First of all appium cannot automate pre-installed apps from play stores. You should have a ".apk" file to install it.
Secondly, appium cannot automate bringing up of emulator, however a way to do it is through the use of script of adb commands.Check through the adb command if any device is active
adb devices
If it is not then you can start your emulator using the emulator commands of adb.
For complete adb commands reference.
http://developer.android.com/tools/help/adb.html.
Lastly you can use different modes of appium like "--full-reset" for re-installing the app even if it is pre-installed or simple "appium" will start the ".apk" which was once installed by it.
Check all the modes here - "github.com/appium/appium/blob/master/docs/server-args.md"
For other basic queries, visit - https://github.com/appium/training

Related

GoCD - Task Plugins not adding tasks

I have setup a GoCD server and agent (on a Windows machine if that matters). I am using it to build a .NET application. I have installed a few Task plugins (Powershell, Xunit-converter) and when I restart the server I see those as loaded and installed without issue in the plugin admin screen.
However, when I go to create or edit a job, I do not see these new tasks in the "Add Task" dropdown. I can get around the powershell one by using a Custom command, but I need to be able to convert my MsTest ouptut to Xunit so that it can display the results in the Test Results Tab.

How to develop remotely in PyCharm?

I have a lab system (with a hardware piece attached to it) which has some python test scripts. The test script sends commands to the attached hardware and receives response.
I don't want to work on the lab computer all the time. Currently, I'm using SSH from my local machine to the lab computer and using the shell to modify the scripts, run the commands etc. Using nano is cumbersome especially while debugging. I want to use an IDE (Pycharm) on my local machine in order to edit and run the scripts on the remote server. Pycharm has remote interpreters which uses the remote python but I want to be able to access and modify the scripts too, just like SSH from terminal.
How can I do that?
PyCharm (Professional Edition only) is also capable of Deployments. You can upload/download files via SFTP directly within Pycharm and run your scripts remotely.
You can visit the following pages for further instructions on how to set everything up:
Setting up a deployment
Configuring a remote interpreter
Yes, PyCharm Professional Edition can do this. Since PyCharm 2018.1 setting up a remote interpreter also automatically sets up deployment. If you have automatic deployments configured (Tools | Deployment | Automatic Deployment) all changes will automatically be uploaded to your SSH box.
See here for a tutorial on configuring an SSH box in PyCharm Professional Edition: https://blog.jetbrains.com/pycharm/2018/04/running-flask-with-an-ssh-remote-python-interpreter/

2 Google Glasses, ADB sees one but not the other?

I am trying to side-load an apk onto a friend's Google Glass to test my app. I'm using a machine running Windows 8. The Glass drivers are properly configured on the machine because I am able to connect to and side-load apps to my personal glass, which is running XE12.
I have turned on debug on his device which also has XE12. When I plug in my Google Glass, "adb devices" returns the serial number as expected, so I know the problem is not the machine, cable, or theoretically the driver. When I unplug mine and plug his in, adb does not see it. I have tried killing/restarting the adb server. I tried going through the driver install process while his was connected, but no luck. I've tried restarting his Glass. I can connect to his device on a Mac with adb, so I know it is not the device. Any ideas?
have you tried
adb shell kill-server
adb shell start-server
my adb has trouble when I swap android devices plugging/unplugging in another device especially my glass.

How to get start with Appcelerator Titanium

I am very new to Appcelerator Titanium. I followed the instructions and could able to successfully install the software and android sdk(only android for the time being). But as the site suggested when I tried to import and run the KitchenSink, I can see nothing on my emulator. It is not running. What will be the issue?
Or are there any other simple project ? Please help me
Regards
KitchenSink is some heavy application.
So start your emulator and then run project from Titanium Studio, wait for some time. If it is not running after this, check your android SDKsetting (Window->Preferences->Titanium Studio->Titanium)also check your java environment variable setting.
When your application setting will get properly done, your application will definitely execute.

How to automate installer testing

I'm wondering if anyone has any best practices for automating the testing of installers on various machines with potentially different hardware / software profiles and by specifying various options to the installer. The idea would be that I could write "unit test like" code to set up a machine, run the installer, then test that certain things are true. Tests might look similar to:
Test:
Boot Machine without IIS
Run Installer
Assert Installer Had Errors
Test:
Boot Machine with IIS
Run Installer
Assert Installer Ran
Test_Fixture:
SetUp:
Boot Machine with IIS
Test:
Run Installer without IIS install
Assert Website Not Installed
Test:
Run Installer with IIS install
Assert Website Installed
I know I could create lots of VMs, but waiting for a VM to boot for each functional test sounds like way more work than I want. What I really want is a way to virtualize the installer environment. Any suggestions?
We have created a set of VMs and find it is very easy to manage. We run the tests for 13 different Windows installers over night. The VMs we have created our very bare bones, so it is possible to run a number of tests in parallel.
If you have the installer runnable from the command line, it's easy to have a script to call it automatically.
Then you can use a web app testing tool to see it the install was successful, like this one http://seleniumhq.org/ For this you will need an unique way to test a new install - like a page with the current version.