def write_report_file
      raise FileNotFoundException.new 'There is no report file path specified' if report_path.blank?

      report = build_report

      if append_report.present? && File.exist?(report_path)
        f            = File.open(report_path)
        existing_xml = Nokogiri::XML(f)
        f.close

        report = existing_xml.root << Nokogiri::XML(report).at('testsuite')

        # formatting
        report = format_xml report.to_xml
      end

      File.write report_path, report
      report
    end
def write_report_file
      raise FileNotFoundException.new 'There is no report file path specified' if report_path.blank?

      report = build_report

      if append_report.present? && File.exist?(report_path)
        f            = File.open(report_path)
        existing_xml = Nokogiri::XML(f)
        f.close

        report = existing_xml.root << Nokogiri::XML(report).at('testsuite')

        # formatting
        report = format_xml report.to_xml
      end

      File.write report_path, report
      report
    end
Writes the report to the specified file
 also returns the new XML report content

 @return [String] final XML report content