Skip to main content

Updating My Favorite Script

Since the last time I updated my blog, I've changed jobs and titles. While I still technically work in my new company's QA organization, my work is devoted more to app delivery than app testing. This doesn't mean I am not a tester anymore but that it consumes less of my time. It's no surprise therefore that I'm only NOW getting around to posting an update to my favorite script which I first shared 3 years ago here in this post.

3 years later and at least 3 years lazier, the ways I've modified the script are all designed to simplify it, make it more generic, and have it do more of the work for you. Instead of supplying a lot of configuration, it only concerns itself with the URL to the last successful build artifact of your build job. In this regard, I highly recommend NOT configuring your builds to name the files with dynamic data such as date, build number, git hash, etc. The filename is not something I'd consider a trustworthy source of build trivia even though it may be tempting to use it in that way. Besides, with a static link because the filename is consistent, you can do really awesome things more easily.

As it is basically an evolution of the script I've already written about, here's the list of changes:
  • Removed config file usage. Now the script only has a single dependency which you can edit in one line at the top of the file: APK_URL
  • Automatically handles multiple APKs in the directory (this is in case you want to use copies of the script for multiple APKs or just put the script in a generic working directory
  • Added pre-formatted JIRA template text file output for entering a new bug
  • Added pre-formatted JIRA template text file output for commenting on a bug you've worked on
  • Removed "clear" feature since many apps use the AccountManager API so an uninstall/reinstall is better most of the time
  • Automatically parses APK for launch activity to populate the launch command
  • Automatically handle case where no APK is available
  • Automatically handle case where no devices are available
The intended usage of the script is MOSTLY the same but in this case, you can better use it in situations where you may not have a TextExpander license. The pre-formatted JIRA comments are now baked into the script instead of into snippets in TextExpander, less flexible but faster to get new people started. Typical usage is when you're running a test pass or working on bugfix validations, you'd update the hardcoded APK_URL variable in the beginning of the file and run the script as new builds are available to test with. 

That's it. Sorry it's been over a year since my last posting. Life has been very busy. I've got a 7-month-old baby boy now, bringing the brood up to 3 delightful chaos machines. As I mentioned, I changed jobs. But I am definitely planning on updating more frequently. Expect the topics to shift slightly as my career has shifted slightly. Thanks for your time and see the GitHub gist below for the full details of the updated script.


Comments

  1. The like is wrong that behind the "here in this post" .

    http://www.everybodytests.com/2014/10/my-favorite-script-being-lazy-for-fun.html%20Done

    ReplyDelete
  2. Usually I never comment on blogs but yours is so convincing that I never stop myself to say something about it. keep updating regularly.
    spoken english classes in arumbakkam | spoken english classes in koyambedu | spoken english classes in chennai ayanavaram

    ReplyDelete

Post a Comment

Popular posts from this blog

UiAutomator and Watchers: Adding Async Robustness to UI Automation

"I'm looking over your shoulder... only because I've got your back." ~ Stephen Colbert After my recent UiAutomator review a user brought up an important question about the use of UiWatcher. The watchers serve as async guardians of the test flow, making sure the odd dialog window doesn't completely frustrate your tests. Having a tool that automatically watches your back when you're focused on the functional flow of your tests is awesome. 100% pure awesomesauce. Since the API documentation on watchers is scant and the UI Testing tutorial on the Android dev guide doesn't cover their use in depth, I figured I should add a post here that goes over a simple scenario demonstrating how to use this fundamentally important UI automation tool. In my example code below, I'm using uiautomator to launch the API Demo app (meaning run this against an Emulator built in API level 17 - I used the Galaxy Nexus image included in the latest ADT and platform tools). ...

UiAutomator.jar: What happened when Android's JUnit and MonkeyRunner got drunk and hooked up

"Drunkenness does not create vice; it merely brings it into view" ~Seneca So Jelly Bean 4.2 landed with much fanfare and tucked in amongst the neat new OS and SDK features (hello, multi-user tablets!) was this little gem for testers: UiAutomator.jar. I have it on good authority that it snuck in amongst the updates in the preview tools and OS updates sometime around 4.1 with r3 of the platform. As a code-monkey of a tester, I was intrigued. One of the best ways Google can support developers struggling with platform fragmentation is to make their OS more testable so I hold high hopes with every release to see effort spent in that area. I have spent a couple days testing out the new UiAutomator API  and the best way I can think of describing it is that Android's JUnit and MonkeyRunner got drunk and had a code baby. Let me explain what I mean before that phrase sinks down into "mental image" territory. JUnit, for all its power and access to every interface, e...

Why Developers Shouldn't Perform Software Testing - A Rebuttal

Take a minute and read the following 2-pager entitled " Guest View: Why developers shouldn’t perform software testing ". Man, I tried to like this article because the author, Martin Mudge, clearly knows that businesses who undervalue quality by trying to eliminate testing through simply shuffling the traditional testing task to developers are making a huge mistake. Unfortunately he begins by making an assertion that testing overburdens a developer which at face value is complete nonsense. If you feel overburdened, it is a timeline issue and that is true no matter WHAT the nature of the tasking is.  So his assertion of “one the most important” contributing factors being overburdening the developers is massively flawed. It gets immediately worse from there because his second point is about time constraints.  Mr Mudge just gets so much wrong. What he really should be shooting down is the idea that testing, as a cost-center not as a task, can be eliminated by having your p...