Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » help,help,help,about repgen (How does repgen write test reports?)
help,help,help,about repgen [message #1780997] Wed, 31 January 2018 07:05 Go to next message
lv lvzhiguo is currently offline lv lvzhiguoFriend
Messages: 4
Registered: November 2017
Junior Member
from userguide.pdf ,I know repgen can generate test reports(*.html) according .log file, and the *html contains two list boxes and four buttons,so I write a .ts file ,and perform repgen *.ts ,*html is created,

but the page content is too less ,can't meet my need,I want to it can display more information about testcase .
====================================
so I want to know :
1、how repgen work?
2、Can repgen be extended?if can,how to do?
============================================
*.ts is below:
#Title test1122
#Tab length 8
#Column width 80
#TTCN-3 code /home/majch/workspace1/UDP-test-1122
#TTCN-3 log /home/majch/workspace1/UDP-test-1122/log
#Other log ./
#Destination ./
#Testcase SendMessage
#Purpose send message test
#Description
send message test yelidan just test the communication testsystem and SUT
  • Attachment: CatchD51F.jpg
    (Size: 57.22KB, Downloaded 128 times)

[Updated on: Thu, 01 February 2018 01:07]

Report message to a moderator

Re: help,help,help,about repgen [message #1781093 is a reply to message #1780997] Thu, 01 February 2018 10:29 Go to previous messageGo to next message
Jeno Attila Balasko is currently offline Jeno Attila BalaskoFriend
Messages: 80
Registered: September 2013
Location: Budapest, Hungary
Member

Hi,

Sorry for the late answer but repgen is absolutely out of focus and I should have tested all the functionality to answer. The titan.EclipsePlug-ins (our ttcn-3 IDE) contains a LogViewer with a more sophisticated service (see Capture5.JPG)
index.php/fa/31974/0/
Question 1. Working with repgen

I give you an example with the Hello World project delivered by titan.core or generated by titan.EclipsePlug-ins.
1. Create a .rs file!
Do not use windows file delimiter in your .rs file! If you use Windows file delimiter you get this message:
$ repgen.exe repgendef.ts
Parse error at line 1:

Do not use relative path, otherwise the verdicts and the logging lines are not generated in the html pages ( and the .ttcnlog files will not be generated)! Use absolute path instead!
My .rs file is repgendef.rs is as follows:
#Title Hello World
#Tab length 10
#Column width 80
#TTCN-3 code /cygdrive/c/Users/ETHBAAT/workspace/runtime-ttcn2java_debug_configuration_on_neon.3/HelloAndrea/src
#TTCN-3 log /cygdrive/c/Users/ETHBAAT/workspace/runtime-ttcn2java_debug_configuration_on_neon.3/HelloAndrea/log
#Other log ./
#Destination /cygdrive/c/Users/ETHBAAT/workspace/runtime-ttcn2java_debug_configuration_on_neon.3/HelloAndrea/src

#Testcase tc_HelloW
#Purpose
The first HelloW demonstrates the sending
#Description
This test should always finish with pass

#Testcase tc_HelloW2
#Purpose
The second testcase HelloW2 demonstrates xxx
#Description
This section describes the test case in detail.


#Testcase tc_1
#Purpose
This testcase shows the usage of refers and apply
#Description
This testcase shows the usage of refers and apply and returns with pass 

#Testcase tc_2
#Purpose
This testcase shows the usage of refers and apply
#Description
This testcase shows the usage of refers and apply and returns with pass 

#Testcase tc_3
#Purpose
This testcase shows the usage of refers and apply
#Description
This testcase shows the usage of refers and apply and returns with pass


2. Check that your $TTCN3_DIR is set and this way your repgen and logformat are available:
$ repgen
Usage: repgen inputfile [-h]
$ logformat
usage: logformat [-i n] [-o outfile] [-s] [-n] [file.log] ...
   or  logformat -v

3. Create the report:
$ repgen.exe repgendef.ts

The file Hello_world-report.html and a subdirectory are created ( See CAPTURE1.PNG)
index.php/fa/31968/0/
4. Open the main report page "Hello_World-report.html" with a browser! The result will depend on the browser and its settings. In case of Windows Explorer the result can be seen on Capture2.JPG (if ActiveX is enabled and blocked content is allowed).
index.php/fa/31970/0/
4. Select a testcase with the Next or Previous buttons and push the button Show.
A page of the testcase will be opened with information of description and of the logging of that testcase. (Capture3.JPG)
index.php/fa/31971/0/
5. Go back to the main page and push the button "Summary". A page with the list of the testcases will appear. The columns of the table are Test Case, Short Description, Verdict (Capture4.JPG)
index.php/fa/31973/0/

Question 2. Contribution, extension

The source code is open and it can be downloaded from https://github.com/eclipse/titan.core. You can contribute the project. Commits are welcomed! At first try the LogViewer!

Hopefully it helps. If not, send us the OS and the version of your titan , please. (command "ttcn3_compiler -v")

Best regards
Jeno Attila Balasko
Titan Team, Ericsson

  • Attachment: Capture1.PNG
    (Size: 22.93KB, Downloaded 397 times)
  • Attachment: Capture2.JPG
    (Size: 58.82KB, Downloaded 398 times)
  • Attachment: Capture3.JPG
    (Size: 191.79KB, Downloaded 407 times)
  • Attachment: Capture4.JPG
    (Size: 84.44KB, Downloaded 388 times)
  • Attachment: Capture5.JPG
    (Size: 144.28KB, Downloaded 411 times)

[Updated on: Thu, 01 February 2018 10:38]

Report message to a moderator

Re: help,help,help,about repgen [message #1781123 is a reply to message #1781093] Thu, 01 February 2018 16:25 Go to previous messageGo to next message
lv lvzhiguo is currently offline lv lvzhiguoFriend
Messages: 4
Registered: November 2017
Junior Member
Hi:
Thank you for your reply.
and I have seen how repgen works.
Logs can be presented in three views,Respectively,Statistical View,MSC View and Text Table View.
I want to integrate LogVIewer's results(chart) into the test report(the html repgen created)

so how should I do?
Looking forward to reply.
Re: help,help,help,about repgen [message #1781162 is a reply to message #1781123] Fri, 02 February 2018 08:39 Go to previous messageGo to next message
Jeno Attila Balasko is currently offline Jeno Attila BalaskoFriend
Messages: 80
Registered: September 2013
Location: Budapest, Hungary
Member

Hi,

there is now way to pass the result of the LogViewer to repgen and there is no way to save the graphical output of LogViewer into any file from Eclipse. It is not supported yet, and because of resource shortage it is not even planned. I think it would be useful to save the result to an easily available format but now the easily available format is the Eclipse itself. The software developer and the software tester has a good IDE, the titan.EclipsePlug-ins and thats all.
What is the the use case, the situation where you want to use such a file output?

Br
Jeno

Re: help,help,help,about repgen [message #1781249 is a reply to message #1781162] Mon, 05 February 2018 01:05 Go to previous messageGo to next message
lv lvzhiguo is currently offline lv lvzhiguoFriend
Messages: 4
Registered: November 2017
Junior Member
Hi:
thanks for your reply.
The project requires that a test report be formed after the test case is completed, and the results of the report show that it needs to have repgen's results, as well as Logviewer's results display.

now the LogViewer's results does not support exports.

I want to know how does LogViewer work?How do LogViewer output views based on log results?

maybe We will implement our needs according to its implementation logic.

look forword replying.
Re: help,help,help,about repgen [message #1781257 is a reply to message #1781249] Mon, 05 February 2018 07:44 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Lv,

In general, the requirements of post-processing and visualizing of the execution logs are very different between projects.
Although both Logviewer and repgen are building on the Titan log file format, they are not the strongest parts of Titan, and are meant largely to show the possibilities
that can be exploited by the users, and they are not meeting any specific requirements.

So my recommendation is that you try to build your own post-processing and visualization tailored to your own requirements , stating from the Titan execution log in easily processable text format ;
My guess is if you look around there might be available pieces of open source software to assist you in this.


Best regards
Elemer



Previous Topic:concatenating templates of list types
Next Topic:Titan in Docker part 1
Goto Forum:
  


Current Time: Thu Apr 18 11:27:35 GMT 2024

Powered by FUDForum. Page generated in 0.02149 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top