Showing posts with label Batch Process Application Testing. Show all posts
Showing posts with label Batch Process Application Testing. Show all posts

Friday, August 26, 2022

Drivers for tool selection

 Drivers for tool selection

1.lower opex

2. Faster payback/break even

3. Faster script build

4. Faster script run -execution and maintenance 

5. Most technology supported

6. Better % automation

7. Easier to skill

8. Faster to scale

9. Easier end to end automation

10. No manual script creation

11. Industrialisation of testing




Sunday, July 17, 2022

Taking Screenshots in automation

 Some of the scenarios we may need to capture a screenshot using Selenium WebDriver are

i. Application issues
ii. Assertion Failure
iii. Difficulty to find Webelements on the web page
iv. Timeout to find Webelements on the web page

Tosca

Take Screen Shot In Tosca Testsuite

A standard module is provided by tricentis to take screenshot. It is present in standard modules. TBox TakesScreenshot

Selenium

Selenium provides an interface called TakesScreenshot which has a method getScreenShotAs which can be used to take a screenshot of the application under test.

Syntax to capture and save the screenshot.
File screenshotFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

Syntax to store it in our local drive

FileUtils.copyFile(screenshotFile, new File("filename_with_path"));

to capture full page screenshot using Selenium WebDriver:

What is aShot?
aShot is a WebDriver Screenshot utility. It takes a screenshot of the WebElement on different platforms (i.e. desktop browsers, iOS Simulator Mobile Safari, Android Emulator Browser).

aShot might be configured to handle browsers with the viewport problem. This gives a screenshot of the entire page even for Chrome, Mobile Safari, etc

Add this jar file in to your project. Note: Select Project and Right click on the Project – Go to ‘Build path’ – Go to ‘Configure build path’ – Click on ‘lib’ section – Add external jar

Screenshot fpScreenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000)).takeScreenshot(driver);

                  ImageIO.write(fpScreenshot.getImage(),"PNG",new File("D:///FullPageScreenshot.png"));

To Capture Screenshot of Failed Test Cases Using Selenium WebDriver

If a script fails, we need to know where was the error in script. Solution for this is to capture a screenshot of webpage when the test case fails. We could easily identify where exactly the script got failed by seeing the screenshot.

To achieve this, we could place the entire code in try-catch block. Which means placing the test steps in try block and screen capture statement in catch block. If a test step fails in the try block then it goes to the catch block and capture a screenshot of the web page.

 

UFT/QTP 

Dim ScreenName

  On Error Resume Next

  ScreenName = " "
  
  CurrentTime = "_Test_Case"&"_"& Day(Now)&"_"& Month(Now)&"_"& Year(Now)&"_"&

   Hour(Now)&"_"& Minute(Now)&"_"& Second(Now)

  ScreenShotName = "Name_of_the_Screen" &  CurrentTime & ".png"

  ScreenName ="Path where the Screenshot needs to be stored"&"\"&ScreenShotName

  Desktop.CaptureBitmap ScreenName,True

 

 

Monday, October 30, 2017

Batch Process Application testing using UFT

Greetings to Readers,

Another try on sharing knowledge for batch process application testing using UFT. Below are few approach for automation framework in batch process applications.


  1. Understand the all batch process applications- sub batches functions, based on it decide the automation scenarios. sequence of batches for run, input and output for that batch, validation rules, where that batch files are deployed or run, how to run, how can we run using UFT etc needs to take care
  2. At a time, how many batches can run, do they require same inputs or outputs, dependent on each other, validation for some files, inputs etc.
  3. Try to use different library for all sub batch files, as maintenance is less
  4. Try to use generic functions for some validations of common batches validations
  5. Try to use global variables for maintain data through the batches for validations
  6. Use hybrid framework for automation with combination of module function based approach. here data will not be vary mostly for such type of applications.
Regards,
Trupti