Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to generate clover reports from QTP tests

Our functional tests have been created with QTP and we need to figure out our code coverage. I'm new to both QTP and Clover and am not sure how to get Clover to recognize when QTP tests are executed and therefore generate results from it.

I have installed Clover + Ant and can successfully run clover-start, but no reports are generating. Can anyone help me figure out what I'm doing wrong?

1 answer

0 votes

I assume that by QTP you mean HP Quick Test Pro, am I correct?

I assume that you meant 'clover-setup', am I correct (there's no 'clover-start' command)?

First of all, in order to record code coverage (no matter whether it will be collected by execution of unit tests, execution of QTP tests or by manual clicking through the UI) your application must be instrumented. In case of Ant-based builds you have to call <clover-setup> before compilation of the code.

Examplary Ant targets:

clean:

<delete> to remove old classes

with.clover:

<clover-setup> to initialize Clover

compile:

<javac> or <groovyc> to instrument & compile an application

test:

<junit> or QTP or shell scripts etc; see below

clover.report:

<clover-report> to generate reports

Now. How to integrate Clover with Quick Test Pro? It depends what do you want to achieve.

If you will be satisfied by having a global code coverage (i.e. with no per-test coverage) you can just run your QTP tests using instrumented application; after testing just generate a Clover report. I suggest configuring this as a first step.

Next, if you want to see code coverage from every test separately, there are two ways:

  • you can generate separate HTML report for each test - you'd have to delete coverage recording files from previous tests, next run one QTP test, next generate Clover report - repeating all three steps for every test case
  • you can generate a single HTML report, in which you would see in addition a per-test coverage data - you'd have to "hack" Clover and inform it when given QTP test starts and ends - see Measuring+per-test+coverage+for+manual+tests

Cheers
Marek

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Opsgenie

Investigate deployment-related incidents with Bamboo and Opsgenie together

Back in April of last year one of the major product announcements from Opsgenie was the launch of the Incident investigation view which created a deep connection between Bitbucket and Opsgenie, empow...

149 views 1 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you