def testng(registry, xml_parent, data):
 reporter = XML.SubElement(xml_parent, 'hudson.plugins.testng.Publisher')
 reporter.set('plugin', 'testng-plugin')
 threshold_modes = {'number': 1, 'percentage': 2}
 mappings = [('pattern', 'reportFilenamePattern', None), ('escape-test-description', 'escapeTestDescp', True), ('escape-exception-msg', 'escapeExceptionMsg', True), ('fail-on-failed-test-config', 'failureOnFailedTestConfig', False), ('show-failed-builds', 'showFailedBuilds', False), ('unstable-skips', 'unstableSkips', 100), ('unstable-fails', 'unstableFails', 0), ('failed-skips', 'failedSkips', 100), ('failed-fails', 'failedFails', 100), ('threshold-mode', 'thresholdMode', 'percentage', threshold_modes)]
 helpers.convert_mapping_to_xml(reporter, data, mappings, fail_required=True)

def testng ( registry , xml_parent , data ) : reporter = XML . SubElement ( xml_parent , 'hudson.plugins.testng.Publisher' ) reporter . set ( 'plugin' , 'testng-plugin' ) threshold_modes = { 'number' : 1 , 'percentage' : 2 } mappings = [ ( 'pattern' , 'reportFilenamePattern' , None ) , ( 'escape-test-description' , 'escapeTestDescp' , True ) , ( 'escape-exception-msg' , 'escapeExceptionMsg' , True ) , ( 'fail-on-failed-test-config' , 'failureOnFailedTestConfig' , False ) , ( 'show-failed-builds' , 'showFailedBuilds' , False ) , ( 'unstable-skips' , 'unstableSkips' , 100 ) , ( 'unstable-fails' , 'unstableFails' , 0 ) , ( 'failed-skips' , 'failedSkips' , 100 ) , ( 'failed-fails' , 'failedFails' , 100 ) , ( 'threshold-mode' , 'thresholdMode' , 'percentage' , threshold_modes ) ] helpers . convert_mapping_to_xml ( reporter , data , mappings , fail_required = True )
yaml: testng this plugin publishes testng test reports .