private void addRowToTable(TestExecutionReport.Table resultTable, Table table, int row) { TestExecutionReport.Row resultRow = new TestExecutionReport.Row(); resultTable.add(resultRow); int cols = table.getColumnCountInRow(row); for (int col = 0; col < cols; col++) { String contents = table.getCellContents(col, row); if (isScenarioHtml(contents)) { addColorizedScenarioReference(resultRow, contents); } else { String colorizedContents = HtmlTable.colorize(contents); resultRow.add(colorizedContents); } } }
private void addColorizedScenarioReference(TestExecutionReport.Row resultRow, String contents) { String status = getTestStatus(contents); String tableName = getTableName(contents); resultRow.add(String.format("%s(scenario:%s)", status, tableName)); }