@Test
  public void testEmbeddedBeelineOutputs() throws Throwable{
    String embeddedJdbcURL = Utils.URL_PREFIX+"/Default";
    List<String> argList = getBaseArgs(embeddedJdbcURL);
    // Set to non-zk lock manager to avoid trying to connect to zookeeper
    final String SCRIPT_TEXT = "set hive.lock.manager=org.apache.hadoop.hive.ql.lockmgr.EmbeddedLockManager;\n"
        + "set hive.compute.query.using.stats=false;\n"
        // Embedded BeeLine test does not work with tez engine, so reset it to mr - TODO: fix this in HIVE-25097
        + "set hive.execution.engine=mr;"
        + "create table if not exists embeddedBeelineOutputs(d int);\n"
        + "set a=1;\nselect count(*) from embeddedBeelineOutputs;\n"
        + "drop table embeddedBeelineOutputs;\n";
    final String EXPECTED_PATTERN = "Stage-1 map =";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
  }
Test Beeline will hide the query progress when silent option is set.
@throws Throwable
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java