@Karthik
Can you please give me a sample script which uses ItestContext to get test
name. I need to get test name from testsuite.xml
It will really helpful.
Thanks
Ravi
On Wednesday, 7 March 2012 13:33:45 UTC+5:30, Karthik wrote:

ITestContext - interface which contains the information abt the given text
run. Refer the Javadocs in this link

http://testng.org/javadoc/org/testng/ITestContext.html

AFAIK, We can't send the test data thro ITestContext interface.

Please refer the below link for the datarpovider implementation and thats
a good way to store the test data instead of using iTextContest.

http://testng.org/doc/documentation-main.html

Correct if I am wrong

-Jay!!
On Tue, Mar 6, 2012 at 7:33 PM, id4selenium <id4se...@gmail.com<javascript:>
wrote:
Hi,

Could any one provide me a sample script which uses the method with
ITestContext. I am planning to store all the test data which I want to
pass to selenium through the ITestContext interface. Kindly let me
know.

I have seen few example which will used to run test suite of
testcases , But I am not planning to use a test suite as of now. Data
provider will not be of much help to me.

Thanks,

--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com<javascript:>
.
To unsubscribe from this group, send email to
selenium-user...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/selenium-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/qyU3X4jcWwcJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Krishnan Mahadevan at Dec 7, 2012 at 12:55 pm
    @Test
    public void foo(ITestContext ctx){
    System.out.println(ctx.getCurrentXmlTest().getName());
    }

    See if that helps.

    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"


    On Fri, Dec 7, 2012 at 5:00 PM, Ravi hargunani wrote:

    @Karthik
    Can you please give me a sample script which uses ItestContext to get test
    name. I need to get test name from testsuite.xml
    It will really helpful.
    Thanks
    Ravi
    On Wednesday, 7 March 2012 13:33:45 UTC+5:30, Karthik wrote:

    ITestContext - interface which contains the information abt the given
    text run. Refer the Javadocs in this link

    http://testng.org/javadoc/org/**testng/ITestContext.html<http://testng.org/javadoc/org/testng/ITestContext.html>

    AFAIK, We can't send the test data thro ITestContext interface.

    Please refer the below link for the datarpovider implementation and thats
    a good way to store the test data instead of using iTextContest.

    http://testng.org/doc/**documentation-main.html<http://testng.org/doc/documentation-main.html>

    Correct if I am wrong

    -Jay!!
    On Tue, Mar 6, 2012 at 7:33 PM, id4selenium wrote:

    Hi,

    Could any one provide me a sample script which uses the method with
    ITestContext. I am planning to store all the test data which I want to
    pass to selenium through the ITestContext interface. Kindly let me
    know.

    I have seen few example which will used to run test suite of
    testcases , But I am not planning to use a test suite as of now. Data
    provider will not be of much help to me.

    Thanks,

    --
    You received this message because you are subscribed to the Google
    Groups "Selenium Users" group.
    To post to this group, send email to seleniu...@googlegroups.**com.
    To unsubscribe from this group, send email to selenium-user...@**
    googlegroups.com.
    For more options, visit this group at http://groups.google.com/**
    group/selenium-users?hl=en<http://groups.google.com/group/selenium-users?hl=en>
    .
    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/selenium-users/-/qyU3X4jcWwcJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedDec 7, '12 at 12:49p
activeDec 7, '12 at 12:55p
posts2
users2
websiteseleniumhq.org

People

Translate

site design / logo © 2022 Grokbase