Hi Ketan please have a look at the following lines of code : public static void testingSWTApp throws Exception { bot.shell("SWT Example").activate(); bot.button(Example.addButton.getText()).click(); assertEnabled(bot.button("Add")); assertTextContains("Enter 1st Number", bot.textWithLabel(Example.firstNumLabel.getText()));//"Enter 1st Number")); assertTextContains("Enter 2nd Number", bot.textWithLabel(Example.secondNumLabel.getText()));//"Enter 2nd Number")); } Is the above code correct for testing a simple SWT application to add two numbers which have one button , two labels ...............
if yes, please help me what should I do next because now this code is throwing NullPointerException because I am trying to get text of Button by using its Class Name bot.button(Example.addButton.getText()).click(); -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ketan Padegaonkar Sent: Monday, July 21, 2008 12:41 AM To: swtbot-users@lists.sourceforge.net Subject: Re: [SWTBot-users] please help in writing functional testingtoolSWT Application Importance: High On 17-Jul-08, at 3:03 PM, Shalini Gupta wrote: > > Hi Ketan, > > Thanks for the reply and an example is really helpful me a lot, But my > doubt is how should I integrate SWTBotButtonTest class (for eg) with > my > SWT Application. As per the example I created the test case so that it > can run along with SWT application to test the Button Control. You don't really need to create another plugin if you're just doing a regular SWT application. > Do I need to create an SWT Plugin and then integrate it or there is > some > other way. > Please correct me if I am wrong as I told u before I just started > studying about this topic so I don't ve much knowledge. What you'll need is another project that will hold your test sources (or create another "tests" sources directory in your project) and add SWTBot to the classpath. -- Ketan ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ SWTBot-users mailing list SWTBot-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/swtbot-users http://swtbot.org/ - a functional testing tool for SWT/Eclipse This email message and its attachments may contain CONFIDENTIAL AND PRIVILEGED INFORMATION intended for the sole use of the addressee(s). If you have received it in error, please contact the sender by return email, notify your system manager and destroy the original message and any copies thereof. Any review, use, disclosure or distribution is unlawful. Please check this email and any attachments for the presence of viruses. The Company accepts no liability for any damage caused by any virus transmitted by this email. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The Company reserves the right to monitor, review and store the content of all messages sent to or from this e-mail address. www.aztecsoft.com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ SWTBot-users mailing list SWTBot-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/swtbot-users http://swtbot.org/ - a functional testing tool for SWT/Eclipse