Hi do you have any related links .. For this issue so that I may understand
more on this matter
On 27/03/2015 10:17 AM, "Marc R. Hoffmann" <[email protected]>
wrote:
> Hi,
>
> so you integrated your code into the Jenkins plugin? In this case please
> ask at the JaCoCo Jenkins plug-in project how the lifecycle of the plug-in
> works and how to hook into the buid process.
>
> Alternatively you coud e.g. create your own Maven or Ant plugin which gets
> executed with your build independently of Jenkins.
>
> Regards,
> -marc
>
> On 25.03.15 14:18, Saurabh Garg wrote:
>
> hi is there any way i can generate a text file containing all missed lines.
>
>
>
> in plugin i edited some things
>
> Inside sourceannotator class i inserted a a condition as follows in
> printhighlighted lines method.
> private void printHighlightedLine(StringBuilder buf, int lineNumber,
> ICounter cov, String sourceLine, int status) {
> String Color_Of_Line=getStatusColor(status);
> if (Color_Of_Line.equals("#ffaaaa"))
> {
> buf.append("<H1>"+lineNumber + ":");
>
> String tooltip = getTooltip(cov);
> if (tooltip != null) {
> buf.append("*<SPAN title=\"").append(tooltip).append("\"");
> } else {
> buf.append("<SPAN");
> }
>
> buf.append(" style=\"BACKGROUND-COLOR: " + getStatusColor(status)
> + "\">").append(sourceLine).append("</SPAN>").append("<br></H1>");
>
> try {
> Pappu.Write_to_text(lineNumber, sourceLine, Color_Of_Line,
> buf);
> } catch (IOException ex) {
>
> Logger.getLogger(SourceAnnotator.class.getName()).log(Level.SEVERE, null,
> ex);
> }
> }
> else{
> buf.append(lineNumber + ":");
> String tooltip = getTooltip(cov);
> if (tooltip != null) {
> buf.append("*<SPAN title=\"").append(tooltip).append("\"");
> } else {
> buf.append(" <SPAN");
> }
>
> buf.append(" style=\"BACKGROUND-COLOR: " + getStatusColor(status)
> + "\">").append(sourceLine).append("</SPAN>").append("<br>");
> }
>
> }
>
>
> this function when find status as #ffaaaa it calls a method in which takes
> four arguments its definition is like this
>
>
>
> public void Write_to_text(int LineNumber, String SourceLine, String
> Color_Of_Line,StringBuilder buf) throws IOException{
> String Java_Source_Path;
> String Experiment;//=null;
> SourceLine=SourceLine.replaceAll(" ","
> ").replaceAll("<","<").replaceAll(">",">");
> buf.append("<H1><br>This Point was reached " );
> buf.append("</H1>");
>
> // if (Java_Source_Path!=null)
> // {
> //
> Java_Source_Path=Java_Source_Path.substring(Java_Source_Path.indexOf("com")-1);
>
> // }
> Java_Source_Path=getSource_Path();
> Experiment="\n" + Java_Source_Path +"\t" + LineNumber + "\t"+
> SourceLine;
> buf.append("<H1><br>This Point was reached " + Experiment);
> buf.append("</H1>");
> FileWriter Jacoco_File_Writer = null;
> Jacoco_File_Create = new File("/home/test/RedLines.txt");
> try {
> Jacoco_File_Writer = new FileWriter(Jacoco_File_Create,true);
> Jacoco_File_Writer.write(Experiment);
> Jacoco_File_Writer.flush();
> Jacoco_File_Writer.close();
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> JacocoPub.setWrite_to_Text(Experiment);
> }
>
> but this method writes to text file only when i click to its report on
> console please help me so that i can get this string as soon as i build the
> project in jenkins
> --
> You received this message because you are subscribed to the Google Groups
> "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/c69acda5-c09b-4b89-989e-4fe76c6cad64%40googlegroups.com
> <https://groups.google.com/d/msgid/jacoco/c69acda5-c09b-4b89-989e-4fe76c6cad64%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jacoco/lDyiPeI4BmI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/5514E0D7.8080604%40mountainminds.com
> <https://groups.google.com/d/msgid/jacoco/5514E0D7.8080604%40mountainminds.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/CAOg0YX7BYzuQpg8f-42Q5f3_5_2eAnmcGtFnZ%2B3%2B752ekjXLEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.