jruby

A JRuby jar include tip

Ever need to include a Java jar file in a JRuby script? As I work to convert my Mac speech recognition server to JRuby, the first task I need to tackle is to include the Sphinx-4 jar files in my JRuby path. You can include one Java jar file in your JRuby script path very easily, like this:

require 'lib/sphinx4.jar'

where the jar file 'sphinx4.jar' is in a local subdirectory named lib, which is cool. But if you need to include many Java jar files into your JRuby script at one time, here's a very cool way to do that:

Mac speech recognition - How I control my iMac with speech recognition

Mac speech recognition software: I just had a fun interaction with my iMac that went a little like this:

Al is standing in kitchen, peeling an avocado. It's a little quiet, so he says, "Computer, play the movie Juno."

The computer says something snarky like "Yes, master" (or in Alaska, "You betcha"). In a few moments the movie begins playing.

Al smiles.

Early alpha release of my Agile/Automated GUI Testing software

Automated GUI Testing Software: If you happen to be looking for something to do this weekend, here's a very early release of our free (GPL) Agile GUI Testing software (AGT).

In short, just download the file below, and when you un-tar it, it will create a "scripts" folder. That folder contains our GUI testing software, along with two sample scripts. If you'd like to see how the sample scripts work, they are shown in this two-minute YouTube video (Agile GUI testing, basic demo).

A Java JRuby screenshot (screen capture) example

Java image FAQ: Can you show me how to create a screen capture in Java?

I don't have any Java screen capture code to share at the moment, but if you don't mind a JRuby screen capture example (which you can easily convert to Java), this JRuby screenshot (screen capture) source code example should help point you in the right direction:

My Agile/Automated GUI testing software: A sample script

Automated GUI Testing Software: I'm still debating on the name of my GUI testing software (I've been calling it XGT, for eXtreme GUI Testing software), and today I'm calling it Agile GUI Testing (or Agile GUI Tester). None of that matters at the moment, but after pounding away on it some more last night, I thought I'd share a sample script of how this software works.

To that end, here's a sample Agile GUI Testing software script that does the following:

eXtreme GUI Software Testing (Part 2)

As I mentioned in a previous blog entry (eXtreme GUI Testing, Part 1) I've been motivated to work on a project in my spare time, and I'd like to start leaking the details here.

For lack of a better name I'm currently calling this project eXtreme GUI Tester, or XGT for short. As its name implies, this is an application (actually a suite of applications) that hopes to make automated GUI testing a little more of a reality.

eXtreme GUI Testing and Software QA, Part 1

The grand experiment has begun. The problem: I've been on a project developing a very deep application for four years now, and lately it's become so complex and intertwined that things are starting to break. Developers have been known to say "The application is smarter than I am." I'm just a wee bit concerned about our software quality.

Throughout all of this I started to notice that many of these bugs could be found if we had ... (drumroll) ... automated GUI tests.

How to run JRuby from a Ruby script on a Windows PC

I'm doing some crazy things at the moment, basically calling JRuby from a Ruby script on a Windows 2000 system. I'm doing this because there are a bunch of JRuby scripts that I want to run sequentially, and I also want to check for errors after each run, so what better way to invoke them and look for resulting errors than with Ruby, especially on a Windows system? :)

JRuby Toolkit Robot example - how take a screenshot of your desktop

Here's some sample JRuby code that I just used to take a screenshot of my desktop. It uses the Toolkit and Robot classes from Java to make it all happen. It could probably be a little shorter, but I don't know much about JRuby yet. I also had a problem getting the Java File class to work properly, and referencing it as shown was the only way I could get it to work.