Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.

Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com

Reporting

RajaRaja Members
edited November -1 in Sahi - Open Source
Hi,

Is there a way to get the status of each test case and use my own reporting instead of the html log files? How do you do that?

Also, does sahi script allow to run any system commands during the test execution like backing up db before test execution etc. How do you do that?

Thanks, Raja

Comments

  • I also would like to know this. I started to look at the source code, and noticed there is a Formatter interface and a JUnitFormatter class, which is just what I need.
    But I don't know how to configure Sahi to use it.
  • narayannarayan Administrators
    Hi Raja and Tuler,

    JUnit style logs can be generated by passing the below snippet to the ant target.
    If you add
    <report type="junit" logdir="your/dir/temp/junit"/>
    
    to the ant target, it will create junit style reports.
    Have a look at runfftests target in sahi/demo.xml

    Backing up DB should ideally be done before you call the target/batch file for invoking Sahi tests. While you can call commands using _execute, or directly call Java code from Sahi scripts, backing up a database should ideally be done before you invoke any Sahi script. I would suggest you keep it as a separate task from Sahi tests.

    Regards,
    Narayan
Sign In or Register to comment.