src/main/java/com/simpligility/maven/plugins/android/AbstractAndroidMojo.java
protected String extractInstrumentationRunnerFromAndroidManifest( File manifestFile )
            throws MojoExecutionException
    {
        final URL xmlURL;
        try
        {
            xmlURL = manifestFile.toURI().toURL();
        }
        catch ( MalformedURLException e )
        {
            throw new MojoExecutionException(
                    "Error while trying to figure out instrumentation runner from inside AndroidManifest.xml file "
                            + manifestFile, e );
        }
        final DocumentContainer documentContainer = new DocumentContainer( xmlURL );
        final Object instrumentationRunner;
        try
        {
            instrumentationRunner = JXPathContext.newContext( documentContainer )
                    .getValue( "manifest//instrumentation/@android:name", String.class );
        }
        catch ( JXPathNotFoundException e )
        {
            return null;
        }
        return ( String ) instrumentationRunner;
    }
protected String extractInstrumentationRunnerFromAndroidManifest( File manifestFile )
            throws MojoExecutionException
    {
        final URL xmlURL;
        try
        {
            xmlURL = manifestFile.toURI().toURL();
        }
        catch ( MalformedURLException e )
        {
            throw new MojoExecutionException(
                    "Error while trying to figure out instrumentation runner from inside AndroidManifest.xml file "
                            + manifestFile, e );
        }
        final DocumentContainer documentContainer = new DocumentContainer( xmlURL );
        final Object instrumentationRunner;
        try
        {
            instrumentationRunner = JXPathContext.newContext( documentContainer )
                    .getValue( "manifest//instrumentation/@android:name", String.class );
        }
        catch ( JXPathNotFoundException e )
        {
            return null;
        }
        return ( String ) instrumentationRunner;
    }
Attempts to find the instrumentation test runner from inside the AndroidManifest.xml file.

@param manifestFile the AndroidManifest.xml file to inspect.
@return the instrumentation test runner declared in AndroidManifest.xml, or {@code null} if it is not declared.
@throws MojoExecutionException