SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

Selenium Automation Framework : Reporting Suite Execution Status In Excel

STEP 12
Prerequisite : All previous (STEP 1 to STEP 11) selenium test framework creation steps should be Implemented.

As described In previous post, Your test execution status will be reported In testng report automatically by
SkipException. But If you wants to report execution status (Skipped or Executed) In excel file then once more you have to modify SuiteOneBase.java and SuiteTwoBase.java files.

How To Report Suite Execution Status In Excel
If you know, We have "WriteResultUtility" function In SuiteUtility class. We will use this function In our both test suite's base files to report execution status In TestSuiteList.xls file. Before test suite execution, It will check the "SuiteToRun" flag for that specific test suite. And report "Skipped/Executed" = "Skipped" status against that test suite If "SuiteToRun" = "N". Same way, If found "SuiteToRun" = "Y" then It will report "Skipped/Executed" = "Executed" status against that test suite In TestSuiteList.xls file.
Extract the downloaded folder and replace those files with existing files of "WDDF" project In Eclipse as described bellow.
(Note : It should replace existing file when paste It on package. It should not Insert new file.)

  • Paste SuiteOneBase.java File on com.stta.SuiteOne Package.
  • Paste SuiteTwoBase.java File on com.stta.SuiteTwo Package.
Now open your TestSuiteList.xls file from "com.stta.ExcelFiles" folder of "WDDF" project and set "SuiteToRun" = "N" for "SuiteTwo" as shown bellow.


Now save the TestSuiteList.xls file and close It.

Run Test Suite To Report Execution Status
Note : Before running test suite, Please make sure that your all .xls files are closed. If any file Is open then you will get an error during test suite execution.

Now we are all set for running test suite. Run your both test suites using testng.xml file In eclipse. When eclipse completes execution, open  TestSuiteList.xls file and verify that execution status Is updated or not against both test suites. You will see result as shown bellow.


As you can see In above Image, "SuiteOne" has been marked as "Executed" and "SuiteTwo" has been marked as "Skipped" using our selenium webdriver data driven automation framework.


12 comments:

  1. I am able see the results exactly what you are saying... but not able to the code logic which you provided in TestOneBaseOne.java, Read_XLS.java, SuitBase.java etc....

    Any suggestion to understand these code logic?? You will help is highly appreciable.

    ReplyDelete
  2. For me, both the suite "SuiteONe" and "SuiteTwo" are executed even though SuiteOne is marked as "N" in TestSuiteList.xls file.
    Also the column "Skipped/Executed" is not updated.

    ReplyDelete
    Replies
    1. have you downloaded Download Step 12.zip and updated all files? Give me your email ID so we can chat to resolve Issue.

      Delete
    2. This Skipped/Executed functional not working as describe

      Delete
    3. I am observing the same issue.

      Delete
    4. I am observing the same issue. Both test suites are being run and excel file is not getting updated.

      Delete
  3. Any update on my query? I am waiting ......could not proceed to the next step.....

    ReplyDelete

  4. Cannot open TestSuiteList.xls fie from com.stta.ExcelFiles folder. Everything further is pending because of that. Please help!

    ReplyDelete
  5. For me, both the suite "SuiteONe" and "SuiteTwo" are executed even though SuiteOne is marked as "N" in TestSuiteList.xls file.
    But, the column "Skipped/Executed" are updated in Excel

    ReplyDelete
  6. Hi Aravind, can you re-upload the doc of Step12.zip. The link throws an error and I am not able to download it.
    Thanks/Sourav

    ReplyDelete
  7. Hi Aravind, can you pls explain the code logic like how does it find location of the respective Excel files??..

    ReplyDelete
  8. Hi Aravind, can u pls explain me the code logic of class files.. i am not able to understand utility class code logic functions..?

    ReplyDelete