Element saveToXml() {

		Element root = new Element("PCodeTestResults");
		root.setAttribute(new Attribute("VERSION", XML_VERSION));
		root.setAttribute(new Attribute("JUNIT", jUnitName));
		if (time != 0) {
			root.setAttribute(new Attribute("TIME", Long.toString(time)));
		}

		if (summaryHasIngestErrors) {
			root.setAttribute(new Attribute("INGEST_ERR", "TRUE"));
		}

		if (summaryHasRelocationErrors) {
			root.setAttribute(new Attribute("RELOC_ERR", "TRUE"));
		}

		if (summaryHasDisassemblyErrors) {
			root.setAttribute(new Attribute("DIS_ERR", "TRUE"));
		}

		ArrayList<String> testNames = new ArrayList<>(results.keySet());
		Collections.sort(testNames);

		for (String testName : testNames) {
			TestResults testResults = results.get(testName);
			Element element = new Element("TestResults");
			element.setAttribute(new Attribute("NAME", testName));
			element.setAttribute(
				new Attribute("TOTAL_ASSERTS", Integer.toString(testResults.totalAsserts)));
			element.setAttribute(new Attribute("PASS", Integer.toString(testResults.passCount)));
			element.setAttribute(
				new Attribute("IGNORE", Integer.toString(testResults.ignoredCount)));
			element.setAttribute(new Attribute("FAIL", Integer.toString(testResults.failCount)));
			element.setAttribute(
				new Attribute("CALLOTHER", Integer.toString(testResults.callOtherCount)));
			if (testResults.severeFailure) {
				element.setAttribute(new Attribute("SEVERE_FAILURE", "TRUE"));
			}
			root.addContent(element);
		}
		return root;
	}
Get results entry keyed by "<groupName>.<testName>"
@param groupTestName
@param create
@return
Ghidra/Features/Base/src/main/java/ghidra/test/processors/support/PCodeTestResults.java