Class JsonReport

    • Field Detail

      • junit4

        private JUnit4 junit4
      • targetFile

        private java.io.File targetFile
      • jsonpMethod

        private java.lang.String jsonpMethod
      • projectName

        private java.lang.String projectName
      • slaves

        private java.util.Map<java.lang.Integer,​ForkedJvmInfo> slaves
      • writer

        private java.io.OutputStreamWriter writer
    • Constructor Detail

      • JsonReport

        public JsonReport()
    • Method Detail

      • setFile

        public void setFile​(java.io.File file)
        Output file for the report file. The name of the output file will also trigger how the report is written. If the name of the output file ends with ".htm(l)?" then the output file is a HTML file and CSS/JS scaffolding is also written to visualize the JSON model. If the name of the file ends with ".json(p)?" a JSON file is written.
      • setJsonpMethod

        public void setJsonpMethod​(java.lang.String method)
        Sets wrapper method name for JSONP. If set to non-empty value, will change the output format to JSONP. The name of the JSONP function for the HTML wrapper must be "testData".
        See Also:
        "http://en.wikipedia.org/wiki/JSONP"
      • setProjectName

        public void setProjectName​(java.lang.String projectName)
        Set project name for the output model.
      • setOutputStreams

        public void setOutputStreams​(boolean outputStreams)
        Include output streams? Mind that with large outputs the report may OOM.
      • removeExtension

        private java.lang.String removeExtension​(java.lang.String name)
      • getProjectName

        private java.lang.String getProjectName()
        Return the project name or the default project name.
      • onSuiteResult

        public void onSuiteResult​(AggregatedSuiteResultEvent e)
        Emit information about a single suite and all of its tests.
      • copyScaffolding

        private void copyScaffolding​(java.io.File targetFile)
                              throws java.io.IOException
        Copy HTML/JS/CSS scaffolding to a targetFile's directory.
        Throws:
        java.io.IOException