Wednesday Feb 10, 2010

Using Selenium TestNG/JUnit and XPath Checker to Automate GlassFish v3 AdminGUI Server

It's been almost 2 years since I first use Selenium/TestNG to automate test cases for SocialSite Project. At that time, I'm not aware of using XPath checker or DOM inspector to identify a web element locator ID.

The Selenium APIs and TestNG harness are much more improving and robust now. Writers should be able to search for any answers from the web since more testers/developers are writing Selenium. My long time headache problem which to open a single browser for running with multiple classes is resolved in TestNG interface ITestContext - put it before and after you start/stop your test class

public void startBrowser(ITestContext context){
        browser = new DefaultSelenium();
        context.setAttribute("browser",browser);
        browser.start(); }

public void stopBrowser(ITestContext context) {
       browser = (DefaultSelenium) context.getAttribute("browser",browser);
       browser.stop(); }

I'm writing test for both JUnit and testNG frameworks.  JUnit harness has been widely using in developers community so if one doesn't often share the workspace with developers, I suggest using TestNG frameworks

TestNG has more annotations which provides more flexibility, less test depedency, advanced parametric and re-runable features. In addition, TestNG result is automatically reported in xml/html format.

Click here for my GlassFish V3 Acceptance Test Model

My preferences to the xpath links http://seleniumhq.org/docs/04_selenese_commands.html
http://www.mulberrytech.com/quickref/ http://blogs.sun.com/rajeshthekkadath/entry/xpath_identifying_xpath_of_a

Tuesday Feb 09, 2010

Add GlassFish v2/v3 Servers for Eclipse Bundle with Oracle Enterprise 11gR1 Package

There are few extra steps needed to add GlassFish V3 server to the Eclipse bunlde with Oracle WebLogic Server 11gR1 (10.3.2) Package

1. From the Eclipse IDE, select Help-> Install New Software menu tab

2. Click Add button then enter https://ajax.dev.java.net/eclipse  to the add site (please, see the attached figure) -> click OK button -> continue with the procedure.

AddSite
3. After restart the Eclipse IDE, change to Java EE Perspective -> select Servers tab -> right-click, select New-> Server menu -> expand GlassFish node, select a right GlassFish Server to add.

Note: If you are located inside a proxy domain please, configure the proxy server before downloading the GlassFish Plugin for the Eclipse bundle with Oracle WebLogic Server 11gR1 (10.3.2) Package.

Monday Jun 29, 2009

Running Netbean GlassFish V3 qa-functional Test

The GlassFish V3 plugin qa-functional test is running a little bit different than its previous GlassFish V2.x version which uses XTest for the harness.
Below is the procedure to check out the Netbean web-main, build and run with GlassFish V3 plugin qa-functional test.
Software requirements:
Mercurial hg, ant1.7.1, jdk1.5.0_17, jdk1.6.0_13. GlassFish V3 promoted build
Install Software (Solaris x86):
http://weblogs.java.net/blog/lancea/archive/2009/04/getting_started.html 
Checkout, build and run-test
%hg clone http://hg.netbeans.org/web-main
%cd web-main; ant
%ant -f glassfish.javaee/build.xml -Dtest-qa-functional-sys-prop.v3.server.path=/root/V3-B51-SDK/glassfish -Dtest-qa-functional-sys-prop.v3.server.javaExe=/usr/jdk/jdk1.6.0_12/bin/java test-qa-functional
Where: /root/V3-B51-SDK/glassfish is GlassFish V3 Server installed location
Generate report
%cd glassfish.javaee; ant test-generate-html
Fix the PermGem Memory Problem:
export ANT_OPTS="-Xmx512m -XX:MaxPermSize=128m"

Thursday Apr 17, 2008

Glassfish V3 with Netbean 6.1

Today, I just download Netbean 6.1 RC and try to see if it works with Glassfish V3 server. I'm impressed. It took me <5 minutes to have Glassfish V3 installed and configured with Netbean IDE. The procedure is so much simple and fast now.

It's required only 2 steps to configure Glassfish V3 with Netbean IDE. The Glassfish server was installed during the adding server process. View the screencast below to see how simple it is.
Steps to add Glassfish V3 to Netbean 6.x IDE

About

davisn

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today