The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> Micro Focus/Compuware QARun

Pages: 1
jamesa00
Junior Member


Reged: 02/05/01
Posts: 21
Loc: ottawa
bitmaps...
      #149654 - 08/06/02 02:01 PM

can qarun take a bitmap snapshot of the screen during execution of a script and save it to a folder. You can do this in silktest and visualtest but I have not come across this functionality in qarun.

any help would be appreciated,
thanks,
james

------------------


Post Extras: Print Post   Remind Me!   Notify Moderator  
mooreaz
Member


Reged: 08/02/02
Posts: 186
Loc: Manchester, UK
Re: bitmaps...
      #149655 - 08/07/02 03:58 AM


Unfortunately I can't think of anything simple that could do this. You can look at MakeCheck(). This could make a bitmap check on the fly, but it would not store it to a separate folder and the database would become large very quickly.


An alternative is to write a function to take a screenshot and paste it into Paint. It is not very pretty, but it will do the job.

Try something like....

Attach "WindowName"
Type ("{Alt {Shift {PrintScrn}}}")

Exec ("MSPaint")
Attach ("Paint Window")

MenuSelect ("Edit~Paste")

//Might have to ok a message box here

MenuSelect ("File~Save")

Attach ("Save As Window")
EditText ("File &name", "C:\Temp\Screen1.bmp")
Button ("&Save", 'Left SingleClick')

Attach ("Paint Window")
WinClose

------------------
Automation and Test Consultancy

Testing@archiemoore.co.uk

**************************************

Post Extras: Print Post   Remind Me!   Notify Moderator  
QAGUY
Member


Reged: 05/24/01
Posts: 489
Re: bitmaps...
      #149656 - 08/07/02 07:25 AM

Create a bitmap check at run time???

I don't think so. If you figured out a way to create a bitmap check at run time, you let us all know.

We used to use mspaint also to paste screen shots...but that is sloppy.

A user named QAToolBoy created a program called gradrunner that will capture and save the file for you all in one command. I've attached his tool to this post, you may have to rename it to a .zip file.

You can see the original post and how to use it at http://www.qaforums.com/Forum12/HTML/000181.html

This tool is awsome and always works!

------------------
"If your not part of the solution, there's good money to be made in prolonging the problem."


Post Extras: Print Post   Remind Me!   Notify Moderator  
jamesa00
Junior Member


Reged: 02/05/01
Posts: 21
Loc: ottawa
Re: bitmaps...
      #149657 - 08/07/02 08:41 AM

thanks qaguy and mooreaz.

they have all kinds of functionality for manipulating bitmaps but to bad qarun did not build the functionality to capture bitmaps during runtime into their tool...

I will try out your suggestions and see what I come up with.

james

------------------


Post Extras: Print Post   Remind Me!   Notify Moderator  
QAToolBoy
Member


Reged: 09/15/01
Posts: 40
Loc: Netherlands
Re: bitmaps...
      #149658 - 08/07/02 01:47 PM

Hi,

I have a new version of GrabRunner which also supports Intels JPEG to create .jpg files.

Now a whole screen can be saved into a 0.1 Mb JPEG file
instead of a 2 Mb bitmap file:

GrabRunner = 'C:\QAToolBox\GrabRunner\GrabRunner.exe'
GrabBitmapSave = 'd:\Grab.jpg'

Exec(GrabRunner + ' /SCREEN' + ' /SAVE=' + GrabBitmapSave + ' /PRINT')

To use GrabRunner102, you need the IJL11.dll copied into the same directory as GrabRunner.

Greetings,

------------------


Post Extras: Print Post   Remind Me!   Notify Moderator  
QAGUY
Member


Reged: 05/24/01
Posts: 489
Re: bitmaps...
      #149659 - 08/07/02 03:54 PM

Thanks QAToolBoy!

Now I don't have to use the bitmap to jpeg conversion dll that I made.

------------------
"If your not part of the solution, there's good money to be made in prolonging the problem."


Post Extras: Print Post   Remind Me!   Notify Moderator  
TG
Member


Reged: 03/13/01
Posts: 180
Re: bitmaps...
      #149660 - 08/07/02 11:04 PM

Using freeware is always a good way to go.

However, in answer to the original question, you CAN make QARun grab a screenshot for ya... you just have to be real innovative. Don't play fair! Cheat on QARun.

To do it, simply create a check against the desktop and have it capture the "Whole Screen" (Type tab of check creation dialog). Then use MakeCheck when you hit an error or situation where you want to create a screen capture. Use AttachName() to capture the name of the window that currently is active, and then pass that as a variable to the MakeCheck command. Voila! Instant screen capture.

For example:


Function Main

On Error Goto ErrorHandler

[do some stuff]

End Function

Function ErrorHandler

winName = ActiveName()
ret = MakeCheck( "TemplateName", "NewChkName", "A Description", winName )
msgbox "", ret, 'ok'

End Function

If "ret" returns a value, that means the image was successfully captured and tucked-into a brand new bitmap check.

------------------


Post Extras: Print Post   Remind Me!   Notify Moderator  
mooreaz
Member


Reged: 08/02/02
Posts: 186
Loc: Manchester, UK
Re: bitmaps...
      #149661 - 08/08/02 03:30 AM

Well would you believe it, a bitmap check created at runtime!

------------------
Automation and Test Consultancy

Testing@archiemoore.co.uk

**************************************

Post Extras: Print Post   Remind Me!   Notify Moderator  
QAGUY
Member


Reged: 05/24/01
Posts: 489
Re: bitmaps...
      #149662 - 08/08/02 08:12 AM

Ohhhh....that is awesome!

------------------
"If your not part of the solution, there's good money to be made in prolonging the problem."


Post Extras: Print Post   Remind Me!   Notify Moderator  
TG
Member


Reged: 03/13/01
Posts: 180
Re: bitmaps...
      #149663 - 08/09/02 08:08 PM

I rock.

Never play fair with automated testing tools.

------------------


Post Extras: Print Post   Remind Me!   Notify Moderator  
QAGUY
Member


Reged: 05/24/01
Posts: 489
Re: bitmaps...
      #149664 - 08/12/02 07:27 AM

Now we need a way to convert them to gif or jpg...those bitmaps are big.

------------------
"If your not part of the solution, there's good money to be made in prolonging the problem."


Post Extras: Print Post   Remind Me!   Notify Moderator  
wooks
Unregistered




Re: bitmaps...
      #149665 - 08/12/02 07:33 AM

http://www.develcor.com/utilities/bmptogif.htm

------------------
GUI automation is GUI automation. It is not testing.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Rachna_Bhatia
Newbie


Reged: 01/29/08
Posts: 13
Re: bitmaps... [Re: wooks]
      #560418 - 04/02/09 04:26 AM

hello,

I am working on QTP 9.2 with Java application.I want to use grabrunner for error handling.
After following the steps mentioned above I am getting Type mismatch error
GrabRunner = 'C:\QAToolBox\GrabRunner\GrabRunner.exe'
GrabBitmapSave = 'd:\Grab.jpg'

Exec(GrabRunner + ' /SCREEN' + ' /SAVE=' + GrabBitmapSave + ' /PRINT')

Type mismatch error occuring at EXEC statment.Kindly let me know how to rectify it .I also have the ijl11.dll in my grabrunner folder.

Would appreciate a quick response.
Thanks
-Rachna


Post Extras: Print Post   Remind Me!   Notify Moderator  
Myrtle
Awsome Member


Reged: 06/12/06
Posts: 662
Loc: Spain
Re: bitmaps... [Re: Rachna_Bhatia]
      #560438 - 04/02/09 05:28 AM

Rachna,
You have posted this in the QARun forum.
Most folk with QTP expertise won't look at the QARun forum.
You're much more likely to get a helpful answer if you post in the QTP forum with a descriptive name such as 'Problem with grabrunner'


Post Extras: Print Post   Remind Me!   Notify Moderator  
Rachna_Bhatia
Newbie


Reged: 01/29/08
Posts: 13
Re: bitmaps... [Re: Myrtle]
      #560612 - 04/02/09 09:01 PM

thx...i would do the needful!

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 2 anonymous users are browsing this forum.

Moderator:  Jim Brennan, AJ, DSquared 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 8478

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5