clomid vs nolvadex nolvadex price in south africa levaquin 500 mg dosage celebrex dosage 600 mg is buying nolvadex online legal
bactrim forte 800 160 mg tablet nedir celebrex pharmacy prices buy synthroid no prescription tamoxifen citrate for sale where can i buy renova face cream
prednisolone pills over the counter ciprofloxacin buying propecia online in the uk fluconazole no prescription online cipro prescription
sildenafil que es kamagra france levitra precio chile commander viagra veritable viagra
online viagra australia 
sildenafil generic 
cialis multiple intercourse 
street value of cialis 
sildenafil 50mg 
purchase windows xp 64 creative suite design premium adobe pc to buy price of microsoft visio cheap excel mac download word 2004 trial
commander du viagra en belgique viagra billiger viagra generico portugal
propecia pills buy azithromycin online usa azithromycin tablets 250mg dosage
19 Jun

Starting Appium Via launchd

In a recent project I needed to find a way of getting the Appium node.js app to run all the time on an iOS CI server. The requirements were as follows:

  1. Appium must be run from the checked out Git repository
  2. Launch Appium on start-up, in case the server needs to be rebooted
  3. If Appium crashes (it does sometimes), relaunch the server
  4. Output stdout and stderror to a log file that I can easily view using Console.app to debug problems with Appium

This was achieved with the following launchd plist configuration file placed in ~/Library/LaunchAgents/.

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>KeepAlive</key>
        <dict>
            <key>SuccessfulExit</key>
            <false/>
        </dict>
        <key>Label</key>
        <string>com.companyname.appium</string>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/local/bin/node</string>
            <string>/Users/Mike/Projects/appium/server.js</string>
        </array>
    	<key>Debug</key>
		<true/>
        <key>RunAtLoad</key>
        <true/>
        <key>WorkingDirectory</key>
        <string>/Users/Mike/Projects/appium/</string>
		<key>StandardOutPath</key>
		<string>/Users/Mike/Library/Logs/appium.log</string>
		<key>StandardErrorPath</key>
		<string>/Users/Mike/Library/Logs/appium_error.log</string>
    </dict>
</plist>

 

The WorkingDirectory setting is required, as Appium uses it to locate the instruments/client.js file.

Start the agent by running:


launchctl load ~/Library/LaunchAgents/<configuration name>.plist

Or stop it by running:


launchctl unload ~/Library/LaunchAgents/<configuration name>.plist

Hope this helps!

One thought on “Starting Appium Via launchd

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>