Moved performance/uml out of main.
authorJesse Glick <jglick@netbeans.org>
Tue, 28 Jun 2011 16:36:36 -0400
changeset 387b6e218ca0af
parent 37 e53c993c0d49
child 39 36e2469df89e
Moved performance/uml out of main.
performance/build.xml
performance/manifest.mf
performance/nbproject/build-impl.xml
performance/nbproject/genfiles.properties
performance/nbproject/platform.properties
performance/nbproject/project.properties
performance/nbproject/project.xml
performance/src/org/netbeans/performance/uml/Bundle.properties
performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLActionsOpenUMLProjectTest.java
performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLActionsReverseEngineeringTest.java
performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLActionsTest.java
performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLMemoryFootprintTest.java
performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLMenusTest.java
performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLSetupTest.java
performance/test/qa-functional/src/org/netbeans/performance/uml/UMLUtilities.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/ApplyDesignPattern.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/CodeGenerationFromUMLProject.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/CreateClassDiagramFromMultipleNodes.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/CreateEmptyDiagram.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/CreateSequenceDiagramFromMultipleNodes.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/GenerateDependencyDiagram.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/GenerateModelReport.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/OpenUMLDiagram.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/OpenUMLProject.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/ReverseEngineering.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/ScrollExpandedProject.java
performance/test/qa-functional/src/org/netbeans/performance/uml/actions/SelectingMultipleNodes.java
performance/test/qa-functional/src/org/netbeans/performance/uml/footprint/UMLFootprintUtilities.java
performance/test/qa-functional/src/org/netbeans/performance/uml/footprint/UMLWorkflow.java
performance/test/qa-functional/src/org/netbeans/performance/uml/menus/MultipleNodeContextMenu.java
performance/test/qa-functional/src/org/netbeans/performance/uml/setup/UMLSetup.java
performance/test/unit/src/org/netbeans/performance/uml/prepare/PrepareIDEForUMLComplexMeasurementsTest.java
performance/test/unit/src/org/netbeans/performance/uml/startup/ComplexUMLDiagramStartupTest.java
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/performance/build.xml	Tue Jun 28 16:36:36 2011 -0400
     1.3 @@ -0,0 +1,61 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
     1.6 +<!-- for some information on what you could do (e.g. targets to override). -->
     1.7 +<!-- If you delete this file and reopen the project it will be recreated. -->
     1.8 +<project name="org.netbeans.performance.uml" default="netbeans" basedir=".">
     1.9 +    <description>Builds, tests, and runs the project org.netbeans.performance.uml</description>
    1.10 +
    1.11 +    <property name="test.timeout" value="3600000"/>
    1.12 +
    1.13 +    <property name="test.run.args" value="-client -Xss2m -Xms32m -Xmx512m -XX:PermSize=32m -XX:MaxPermSize=200m -Xverify:none -Dsun.java2d.noddraw=true -Dcom.sun.aas.installRoot=&quot;${j2ee.appserver.path}&quot; -Dtomcat.installRoot=&quot;${tomcat.webserver.path}&quot;"/>
    1.14 +
    1.15 +    <loadfile property="perftestrun.buildnumber"
    1.16 +      srcFile="../../../build.number"
    1.17 +      failonerror="false"
    1.18 +    />
    1.19 +
    1.20 +    <condition property="nbjdk.home" value="e:\\space\\hudson\\jdks\\jdk1.6.0_10">
    1.21 +        <os family="windows"/>
    1.22 +    </condition>
    1.23 +    <condition property="nbjdk.home" value="/space/hudson/jdks/jdk1.6.0_10">
    1.24 +        <os family="unix"/>
    1.25 +    </condition>
    1.26 +
    1.27 +    <target name="test" description="Uses test-single to run each suite in different VM">
    1.28 +        <antcall target="test-single">
    1.29 +            <param name="test.includes" value="**\MeasureUMLSetupTest*"/>
    1.30 +            <param name="test.type" value="qa-functional"/>
    1.31 +        </antcall>
    1.32 +        <antcall target="test-single">
    1.33 +            <param name="test.includes" value="**\MeasureUMLActionsTest*"/>
    1.34 +            <param name="test.type" value="qa-functional"/>
    1.35 +        </antcall>
    1.36 +        <antcall target="test-single">
    1.37 +            <param name="test.includes" value="**\MeasureUMLActionsOpenUMLProjectTest*"/>
    1.38 +            <param name="test.type" value="qa-functional"/>
    1.39 +        </antcall>
    1.40 +        <antcall target="test-single">
    1.41 +            <param name="test.includes" value="**\MeasureUMLMenusTest*"/>
    1.42 +            <param name="test.type" value="qa-functional"/>
    1.43 +        </antcall>
    1.44 +        <antcall target="test-single">
    1.45 +            <param name="test.includes" value="**\MeasureUMLActionsReverseEngineeringTest*"/>
    1.46 +            <param name="test.type" value="qa-functional"/>
    1.47 +        </antcall>
    1.48 +        <antcall target="test-single">
    1.49 +            <param name="test.includes" value="**\MeasureUMLMemoryFootprintTest*"/>
    1.50 +            <param name="test.type" value="qa-functional"/>
    1.51 +        </antcall>
    1.52 +<!-- Disabled because Startup Tests don't work yet
    1.53 +        <antcall target="test-single">
    1.54 +            <param name="test.includes" value="**\PrepareIDEForUMLComplexMeasurementsTest*"/>
    1.55 +            <param name="test.type" value="unit"/>
    1.56 +        </antcall>
    1.57 +        <antcall target="test-single">
    1.58 +            <param name="test.includes" value="**\ComplexUMLDiagramStartupTest*"/>
    1.59 +            <param name="test.type" value="unit"/>
    1.60 +        </antcall>-->
    1.61 +    </target>
    1.62 +
    1.63 +    <import file="nbproject/build-impl.xml"/>
    1.64 +</project>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/performance/manifest.mf	Tue Jun 28 16:36:36 2011 -0400
     2.3 @@ -0,0 +1,5 @@
     2.4 +Manifest-Version: 1.0
     2.5 +OpenIDE-Module: org.netbeans.performance.uml
     2.6 +OpenIDE-Module-Localizing-Bundle: org/netbeans/performance/uml/Bundle.properties
     2.7 +OpenIDE-Module-Specification-Version: 1.0
     2.8 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/performance/nbproject/build-impl.xml	Tue Jun 28 16:36:36 2011 -0400
     3.3 @@ -0,0 +1,27 @@
     3.4 +<?xml version="1.0" encoding="UTF-8"?>
     3.5 +<!--
     3.6 +*** GENERATED FROM project.xml - DO NOT EDIT  ***
     3.7 +***         EDIT ../build.xml INSTEAD         ***
     3.8 +-->
     3.9 +<project name="org.netbeans.performance.uml-impl" basedir="..">
    3.10 +    <property file="nbproject/private/platform-private.properties"/>
    3.11 +    <property file="nbproject/platform.properties"/>
    3.12 +    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
    3.13 +        <attribute name="name"/>
    3.14 +        <attribute name="value"/>
    3.15 +        <sequential>
    3.16 +            <property name="@{name}" value="${@{value}}"/>
    3.17 +        </sequential>
    3.18 +    </macrodef>
    3.19 +    <property file="${user.properties.file}"/>
    3.20 +    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
    3.21 +    <nbmproject2:property name="netbeans.dest.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
    3.22 +    <fail message="You must define 'nbplatform.${nbplatform.active}.harness.dir'">
    3.23 +        <condition>
    3.24 +            <not>
    3.25 +                <available file="${harness.dir}" type="dir"/>
    3.26 +            </not>
    3.27 +        </condition>
    3.28 +    </fail>
    3.29 +    <import file="${harness.dir}/build.xml"/>
    3.30 +</project>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/performance/nbproject/genfiles.properties	Tue Jun 28 16:36:36 2011 -0400
     4.3 @@ -0,0 +1,5 @@
     4.4 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
     4.5 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
     4.6 +nbproject/build-impl.xml.data.CRC32=b9a964e2
     4.7 +nbproject/build-impl.xml.script.CRC32=125813ef
     4.8 +nbproject/build-impl.xml.stylesheet.CRC32=deb65f65
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/performance/nbproject/platform.properties	Tue Jun 28 16:36:36 2011 -0400
     5.3 @@ -0,0 +1,3 @@
     5.4 +nbplatform.active=default
     5.5 +netbeans.dest.dir=${basedir}/../../nbbuild/netbeans
     5.6 +harness.dir=${netbeans.dest.dir}/harness
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/performance/nbproject/project.properties	Tue Jun 28 16:36:36 2011 -0400
     6.3 @@ -0,0 +1,46 @@
     6.4 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     6.5 +#
     6.6 +# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
     6.7 +#
     6.8 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
     6.9 +# Other names may be trademarks of their respective owners.
    6.10 +#
    6.11 +# The contents of this file are subject to the terms of either the GNU
    6.12 +# General Public License Version 2 only ("GPL") or the Common
    6.13 +# Development and Distribution License("CDDL") (collectively, the
    6.14 +# "License"). You may not use this file except in compliance with the
    6.15 +# License. You can obtain a copy of the License at
    6.16 +# http://www.netbeans.org/cddl-gplv2.html
    6.17 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    6.18 +# specific language governing permissions and limitations under the
    6.19 +# License.  When distributing the software, include this License Header
    6.20 +# Notice in each file and include the License file at
    6.21 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    6.22 +# particular file as subject to the "Classpath" exception as provided
    6.23 +# by Oracle in the GPL Version 2 section of the License file that
    6.24 +# accompanied this code. If applicable, add the following below the
    6.25 +# License Header, with the fields enclosed by brackets [] replaced by
    6.26 +# your own identifying information:
    6.27 +# "Portions Copyrighted [year] [name of copyright owner]"
    6.28 +#
    6.29 +# Contributor(s):
    6.30 +#
    6.31 +# The Original Software is NetBeans. The Initial Developer of the Original
    6.32 +# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    6.33 +# Microsystems, Inc. All Rights Reserved.
    6.34 +#
    6.35 +# If you wish your version of this file to be governed by only the CDDL
    6.36 +# or only the GPL Version 2, indicate your decision by adding
    6.37 +# "[Contributor] elects to include this software in this distribution
    6.38 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
    6.39 +# single choice of license, a recipient has the option to distribute
    6.40 +# your version of this file under either the CDDL, the GPL Version 2 or
    6.41 +# to extend the choice of license to its licensees as provided above.
    6.42 +# However, if you add GPL Version 2 code and therefore, elected the GPL
    6.43 +# Version 2 license, then the option applies only if the new code is
    6.44 +# made subject to such option by the copyright holder.
    6.45 +
    6.46 +test.unit.cp.extra=../../nbbuild/build/testdist/unit/ide/org-netbeans-modules-projectui/tests.jar:../../api.progress/build/classes
    6.47 +test.qa-functional.cp.extra=../../nbbuild/build/testdist/unit/ide/org-netbeans-modules-projectui/tests.jar:../../api.progress/build/classes
    6.48 +javac.source=1.5
    6.49 +javac.compilerargs=-Xlint -Xlint:-serial
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/performance/nbproject/project.xml	Tue Jun 28 16:36:36 2011 -0400
     7.3 @@ -0,0 +1,103 @@
     7.4 +<?xml version="1.0" encoding="UTF-8"?>
     7.5 +<!--
     7.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     7.7 +
     7.8 +Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
     7.9 +
    7.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    7.11 +Other names may be trademarks of their respective owners.
    7.12 +
    7.13 +The contents of this file are subject to the terms of either the GNU
    7.14 +General Public License Version 2 only ("GPL") or the Common
    7.15 +Development and Distribution License("CDDL") (collectively, the
    7.16 +"License"). You may not use this file except in compliance with the
    7.17 +License. You can obtain a copy of the License at
    7.18 +http://www.netbeans.org/cddl-gplv2.html
    7.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    7.20 +specific language governing permissions and limitations under the
    7.21 +License.  When distributing the software, include this License Header
    7.22 +Notice in each file and include the License file at
    7.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    7.24 +particular file as subject to the "Classpath" exception as provided
    7.25 +by Oracle in the GPL Version 2 section of the License file that
    7.26 +accompanied this code. If applicable, add the following below the
    7.27 +License Header, with the fields enclosed by brackets [] replaced by
    7.28 +your own identifying information:
    7.29 +"Portions Copyrighted [year] [name of copyright owner]"
    7.30 +
    7.31 +Contributor(s):
    7.32 +
    7.33 +The Original Software is NetBeans. The Initial Developer of the Original
    7.34 +Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    7.35 +Microsystems, Inc. All Rights Reserved.
    7.36 +
    7.37 +If you wish your version of this file to be governed by only the CDDL
    7.38 +or only the GPL Version 2, indicate your decision by adding
    7.39 +"[Contributor] elects to include this software in this distribution
    7.40 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    7.41 +single choice of license, a recipient has the option to distribute
    7.42 +your version of this file under either the CDDL, the GPL Version 2 or
    7.43 +to extend the choice of license to its licensees as provided above.
    7.44 +However, if you add GPL Version 2 code and therefore, elected the GPL
    7.45 +Version 2 license, then the option applies only if the new code is
    7.46 +made subject to such option by the copyright holder.
    7.47 +-->
    7.48 +<project xmlns="http://www.netbeans.org/ns/project/1">
    7.49 +    <type>org.netbeans.modules.apisupport.project</type>
    7.50 +    <configuration>
    7.51 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
    7.52 +            <code-name-base>org.netbeans.performance.uml</code-name-base>
    7.53 +            <standalone/>
    7.54 +            <module-dependencies/>
    7.55 +            <test-dependencies>
    7.56 +                <test-type>
    7.57 +                    <name>unit</name>
    7.58 +                    <test-dependency>
    7.59 +                        <code-name-base>org.netbeans.modules.java.j2seproject</code-name-base>
    7.60 +                        <compile-dependency/>
    7.61 +                    </test-dependency>
    7.62 +                    <test-dependency>
    7.63 +                        <code-name-base>org.netbeans.modules.jellytools</code-name-base>
    7.64 +                        <compile-dependency/>
    7.65 +                    </test-dependency>
    7.66 +                    <test-dependency>
    7.67 +                        <code-name-base>org.netbeans.modules.jellytools.platform</code-name-base>
    7.68 +                        <compile-dependency/>
    7.69 +                    </test-dependency>
    7.70 +                    <test-dependency>
    7.71 +                        <code-name-base>org.netbeans.modules.jemmy</code-name-base>
    7.72 +                        <compile-dependency/>
    7.73 +                    </test-dependency>
    7.74 +                    <test-dependency>
    7.75 +                        <code-name-base>org.netbeans.modules.performance</code-name-base>
    7.76 +                        <compile-dependency/>
    7.77 +                    </test-dependency>
    7.78 +                    <test-dependency>
    7.79 +                        <code-name-base>org.netbeans.modules.projectui</code-name-base>
    7.80 +                        <compile-dependency/>
    7.81 +                    </test-dependency>
    7.82 +                    <test-dependency>
    7.83 +                        <code-name-base>org.netbeans.modules.web.project</code-name-base>
    7.84 +                        <compile-dependency/>
    7.85 +                    </test-dependency>
    7.86 +                    <test-dependency>
    7.87 +                        <code-name-base>org.openide.util</code-name-base>
    7.88 +                        <compile-dependency/>
    7.89 +                    </test-dependency>
    7.90 +                </test-type>
    7.91 +                <test-type>
    7.92 +                    <name>qa-functional</name>
    7.93 +                    <test-dependency>
    7.94 +                        <code-name-base>org.netbeans.modules.jellytools.platform</code-name-base>
    7.95 +                        <compile-dependency/>
    7.96 +                    </test-dependency>
    7.97 +                    <test-dependency>
    7.98 +                        <code-name-base>org.netbeans.modules.performance</code-name-base>
    7.99 +                        <compile-dependency/>
   7.100 +                    </test-dependency>
   7.101 +                </test-type>
   7.102 +            </test-dependencies>
   7.103 +            <public-packages/>
   7.104 +        </data>
   7.105 +    </configuration>
   7.106 +</project>
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/performance/src/org/netbeans/performance/uml/Bundle.properties	Tue Jun 28 16:36:36 2011 -0400
     8.3 @@ -0,0 +1,1 @@
     8.4 +OpenIDE-Module-Name=UML Performance Tests
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLActionsOpenUMLProjectTest.java	Tue Jun 28 16:36:36 2011 -0400
     9.3 @@ -0,0 +1,77 @@
     9.4 +/*
     9.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     9.6 + *
     9.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
     9.8 + *
     9.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    9.10 + * Other names may be trademarks of their respective owners.
    9.11 + *
    9.12 + * The contents of this file are subject to the terms of either the GNU
    9.13 + * General Public License Version 2 only ("GPL") or the Common
    9.14 + * Development and Distribution License("CDDL") (collectively, the
    9.15 + * "License"). You may not use this file except in compliance with the
    9.16 + * License. You can obtain a copy of the License at
    9.17 + * http://www.netbeans.org/cddl-gplv2.html
    9.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    9.19 + * specific language governing permissions and limitations under the
    9.20 + * License.  When distributing the software, include this License Header
    9.21 + * Notice in each file and include the License file at
    9.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    9.23 + * particular file as subject to the "Classpath" exception as provided
    9.24 + * by Oracle in the GPL Version 2 section of the License file that
    9.25 + * accompanied this code. If applicable, add the following below the
    9.26 + * License Header, with the fields enclosed by brackets [] replaced by
    9.27 + * your own identifying information:
    9.28 + * "Portions Copyrighted [year] [name of copyright owner]"
    9.29 + *
    9.30 + * Contributor(s):
    9.31 + *
    9.32 + * The Original Software is NetBeans. The Initial Developer of the Original
    9.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    9.34 + * Microsystems, Inc. All Rights Reserved.
    9.35 + *
    9.36 + * If you wish your version of this file to be governed by only the CDDL
    9.37 + * or only the GPL Version 2, indicate your decision by adding
    9.38 + * "[Contributor] elects to include this software in this distribution
    9.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
    9.40 + * single choice of license, a recipient has the option to distribute
    9.41 + * your version of this file under either the CDDL, the GPL Version 2 or
    9.42 + * to extend the choice of license to its licensees as provided above.
    9.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
    9.44 + * Version 2 license, then the option applies only if the new code is
    9.45 + * made subject to such option by the copyright holder.
    9.46 + */
    9.47 +
    9.48 +
    9.49 +package org.netbeans.performance.uml;
    9.50 +
    9.51 +
    9.52 +import junit.framework.Test;
    9.53 +import org.netbeans.junit.NbModuleSuite;
    9.54 +import org.netbeans.junit.NbTestSuite;
    9.55 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
    9.56 +import org.netbeans.performance.uml.actions.*;
    9.57 +
    9.58 +/**
    9.59 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
    9.60 + *
    9.61 + * @author  mrkam@netbeans.org
    9.62 + */
    9.63 +public class MeasureUMLActionsOpenUMLProjectTest  {
    9.64 +
    9.65 +    public static Test suite() {
    9.66 +        PerformanceTestCase.prepareForMeasurements();
    9.67 +
    9.68 +        NbTestSuite suite = new NbTestSuite("UI Responsiveness UML Actions suite - Open UML Project testcase");
    9.69 +        System.setProperty("suitename", MeasureUMLActionsOpenUMLProjectTest.class.getCanonicalName());
    9.70 +
    9.71 +
    9.72 +        // EPMeasureActions1
    9.73 +        suite.addTest(NbModuleSuite.create(NbModuleSuite.createConfiguration(OpenUMLProject.class)
    9.74 +                .addTest(OpenUMLProject.class, "measureTime")
    9.75 +                .enableModules(".*").clusters(".*").reuseUserDir(true)));
    9.76 +
    9.77 +        return suite;
    9.78 +    }
    9.79 +    
    9.80 +}
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLActionsReverseEngineeringTest.java	Tue Jun 28 16:36:36 2011 -0400
    10.3 @@ -0,0 +1,77 @@
    10.4 +/*
    10.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    10.6 + *
    10.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    10.8 + *
    10.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   10.10 + * Other names may be trademarks of their respective owners.
   10.11 + *
   10.12 + * The contents of this file are subject to the terms of either the GNU
   10.13 + * General Public License Version 2 only ("GPL") or the Common
   10.14 + * Development and Distribution License("CDDL") (collectively, the
   10.15 + * "License"). You may not use this file except in compliance with the
   10.16 + * License. You can obtain a copy of the License at
   10.17 + * http://www.netbeans.org/cddl-gplv2.html
   10.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   10.19 + * specific language governing permissions and limitations under the
   10.20 + * License.  When distributing the software, include this License Header
   10.21 + * Notice in each file and include the License file at
   10.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   10.23 + * particular file as subject to the "Classpath" exception as provided
   10.24 + * by Oracle in the GPL Version 2 section of the License file that
   10.25 + * accompanied this code. If applicable, add the following below the
   10.26 + * License Header, with the fields enclosed by brackets [] replaced by
   10.27 + * your own identifying information:
   10.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   10.29 + *
   10.30 + * Contributor(s):
   10.31 + *
   10.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   10.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   10.34 + * Microsystems, Inc. All Rights Reserved.
   10.35 + *
   10.36 + * If you wish your version of this file to be governed by only the CDDL
   10.37 + * or only the GPL Version 2, indicate your decision by adding
   10.38 + * "[Contributor] elects to include this software in this distribution
   10.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   10.40 + * single choice of license, a recipient has the option to distribute
   10.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   10.42 + * to extend the choice of license to its licensees as provided above.
   10.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   10.44 + * Version 2 license, then the option applies only if the new code is
   10.45 + * made subject to such option by the copyright holder.
   10.46 + */
   10.47 +
   10.48 +
   10.49 +package org.netbeans.performance.uml;
   10.50 +
   10.51 +
   10.52 +import junit.framework.Test;
   10.53 +import org.netbeans.junit.NbModuleSuite;
   10.54 +import org.netbeans.junit.NbTestSuite;
   10.55 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   10.56 +import org.netbeans.performance.uml.actions.*;
   10.57 +
   10.58 +/**
   10.59 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   10.60 + *
   10.61 + * @author  mrkam@netbeans.org
   10.62 + */
   10.63 +public class MeasureUMLActionsReverseEngineeringTest  {
   10.64 +
   10.65 +    public static Test suite() {
   10.66 +        PerformanceTestCase.prepareForMeasurements();
   10.67 +
   10.68 +        NbTestSuite suite = new NbTestSuite("UI Responsiveness UML Actions suite - Reverse Engineering testcase");
   10.69 +        System.setProperty("suitename", MeasureUMLActionsReverseEngineeringTest.class.getCanonicalName());
   10.70 +
   10.71 +
   10.72 +        // EPMeasureActions1
   10.73 +        suite.addTest(NbModuleSuite.create(NbModuleSuite.createConfiguration(ReverseEngineering.class)
   10.74 +                .addTest(ReverseEngineering.class, "measureTime")
   10.75 +                .enableModules(".*").clusters(".*").reuseUserDir(true)));
   10.76 +
   10.77 +        return suite;
   10.78 +    }
   10.79 +    
   10.80 +}
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLActionsTest.java	Tue Jun 28 16:36:36 2011 -0400
    11.3 @@ -0,0 +1,88 @@
    11.4 +/*
    11.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    11.6 + *
    11.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    11.8 + *
    11.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   11.10 + * Other names may be trademarks of their respective owners.
   11.11 + *
   11.12 + * The contents of this file are subject to the terms of either the GNU
   11.13 + * General Public License Version 2 only ("GPL") or the Common
   11.14 + * Development and Distribution License("CDDL") (collectively, the
   11.15 + * "License"). You may not use this file except in compliance with the
   11.16 + * License. You can obtain a copy of the License at
   11.17 + * http://www.netbeans.org/cddl-gplv2.html
   11.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   11.19 + * specific language governing permissions and limitations under the
   11.20 + * License.  When distributing the software, include this License Header
   11.21 + * Notice in each file and include the License file at
   11.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   11.23 + * particular file as subject to the "Classpath" exception as provided
   11.24 + * by Oracle in the GPL Version 2 section of the License file that
   11.25 + * accompanied this code. If applicable, add the following below the
   11.26 + * License Header, with the fields enclosed by brackets [] replaced by
   11.27 + * your own identifying information:
   11.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   11.29 + *
   11.30 + * Contributor(s):
   11.31 + *
   11.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   11.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   11.34 + * Microsystems, Inc. All Rights Reserved.
   11.35 + *
   11.36 + * If you wish your version of this file to be governed by only the CDDL
   11.37 + * or only the GPL Version 2, indicate your decision by adding
   11.38 + * "[Contributor] elects to include this software in this distribution
   11.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   11.40 + * single choice of license, a recipient has the option to distribute
   11.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   11.42 + * to extend the choice of license to its licensees as provided above.
   11.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   11.44 + * Version 2 license, then the option applies only if the new code is
   11.45 + * made subject to such option by the copyright holder.
   11.46 + */
   11.47 +
   11.48 +
   11.49 +package org.netbeans.performance.uml;
   11.50 +
   11.51 +
   11.52 +import junit.framework.Test;
   11.53 +import org.netbeans.junit.NbModuleSuite;
   11.54 +import org.netbeans.junit.NbTestSuite;
   11.55 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   11.56 +import org.netbeans.performance.uml.actions.*;
   11.57 +
   11.58 +/**
   11.59 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   11.60 + *
   11.61 + * @author  mmirilovic@netbeans.org, mrkam@netbeans.org
   11.62 + */
   11.63 +public class MeasureUMLActionsTest  {
   11.64 +
   11.65 +    public static Test suite() {
   11.66 +        PerformanceTestCase.prepareForMeasurements();
   11.67 +
   11.68 +        NbTestSuite suite = new NbTestSuite("UI Responsiveness UML Actions suite");
   11.69 +        System.setProperty("suitename", MeasureUMLActionsTest.class.getCanonicalName());
   11.70 +
   11.71 +
   11.72 +        // EPMeasureActions1
   11.73 +        suite.addTest(NbModuleSuite.create(NbModuleSuite.createConfiguration(OpenUMLDiagram.class)
   11.74 +                .addTest(OpenUMLDiagram.class, "measureTime")
   11.75 +                .addTest(ScrollExpandedProject.class, "measureTime")
   11.76 +                .addTest(SelectingMultipleNodes.class, "measureTime")
   11.77 +                .addTest(CreateClassDiagramFromMultipleNodes.class, "measureTime")
   11.78 +                .addTest(CreateSequenceDiagramFromMultipleNodes.class, "measureTime")
   11.79 +                .addTest(CreateEmptyDiagram.class, "measureTime")
   11.80 +                .addTest(GenerateDependencyDiagram.class, "measureTime")
   11.81 +/* Stability issues, will be enabled later...
   11.82 +                .addTest(GenerateModelReport.class, "measureTime")
   11.83 +                .addTest(CodeGenerationFromUMLProject.class, "measureTime")
   11.84 +                .addTest(ApplyDesignPattern.class, "measureTime")
   11.85 + */
   11.86 +                .enableModules(".*").clusters(".*").reuseUserDir(true)));
   11.87 +
   11.88 +        return suite;
   11.89 +    }
   11.90 +    
   11.91 +}
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLMemoryFootprintTest.java	Tue Jun 28 16:36:36 2011 -0400
    12.3 @@ -0,0 +1,73 @@
    12.4 +/*
    12.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    12.6 + *
    12.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    12.8 + *
    12.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   12.10 + * Other names may be trademarks of their respective owners.
   12.11 + *
   12.12 + * The contents of this file are subject to the terms of either the GNU
   12.13 + * General Public License Version 2 only ("GPL") or the Common
   12.14 + * Development and Distribution License("CDDL") (collectively, the
   12.15 + * "License"). You may not use this file except in compliance with the
   12.16 + * License. You can obtain a copy of the License at
   12.17 + * http://www.netbeans.org/cddl-gplv2.html
   12.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   12.19 + * specific language governing permissions and limitations under the
   12.20 + * License.  When distributing the software, include this License Header
   12.21 + * Notice in each file and include the License file at
   12.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   12.23 + * particular file as subject to the "Classpath" exception as provided
   12.24 + * by Oracle in the GPL Version 2 section of the License file that
   12.25 + * accompanied this code. If applicable, add the following below the
   12.26 + * License Header, with the fields enclosed by brackets [] replaced by
   12.27 + * your own identifying information:
   12.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   12.29 + *
   12.30 + * Contributor(s):
   12.31 + *
   12.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   12.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   12.34 + * Microsystems, Inc. All Rights Reserved.
   12.35 + *
   12.36 + * If you wish your version of this file to be governed by only the CDDL
   12.37 + * or only the GPL Version 2, indicate your decision by adding
   12.38 + * "[Contributor] elects to include this software in this distribution
   12.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   12.40 + * single choice of license, a recipient has the option to distribute
   12.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   12.42 + * to extend the choice of license to its licensees as provided above.
   12.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   12.44 + * Version 2 license, then the option applies only if the new code is
   12.45 + * made subject to such option by the copyright holder.
   12.46 + */
   12.47 +
   12.48 +
   12.49 +package org.netbeans.performance.uml;
   12.50 +
   12.51 +import org.netbeans.junit.NbModuleSuite;
   12.52 +import org.netbeans.junit.NbTestSuite;
   12.53 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   12.54 +import org.netbeans.performance.uml.footprint.UMLWorkflow;
   12.55 +
   12.56 +/**
   12.57 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   12.58 + *
   12.59 + * @author  mrkam@netbeans.org
   12.60 + */
   12.61 +public class MeasureUMLMemoryFootprintTest  {
   12.62 +
   12.63 +    public static NbTestSuite suite() {
   12.64 +        PerformanceTestCase.prepareForMeasurements();
   12.65 +
   12.66 +        NbTestSuite suite = new NbTestSuite("UML Memory Footprint suite");
   12.67 +        System.setProperty("suitename", MeasureUMLMemoryFootprintTest.class.getCanonicalName());
   12.68 +
   12.69 +
   12.70 +        suite.addTest(NbModuleSuite.create(NbModuleSuite.createConfiguration(UMLWorkflow.class)
   12.71 +                .enableModules(".*").clusters(".*").reuseUserDir(true)));
   12.72 +
   12.73 +        return suite;
   12.74 +    }
   12.75 +    
   12.76 +}
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLMenusTest.java	Tue Jun 28 16:36:36 2011 -0400
    13.3 @@ -0,0 +1,73 @@
    13.4 +/*
    13.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    13.6 + *
    13.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    13.8 + *
    13.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   13.10 + * Other names may be trademarks of their respective owners.
   13.11 + *
   13.12 + * The contents of this file are subject to the terms of either the GNU
   13.13 + * General Public License Version 2 only ("GPL") or the Common
   13.14 + * Development and Distribution License("CDDL") (collectively, the
   13.15 + * "License"). You may not use this file except in compliance with the
   13.16 + * License. You can obtain a copy of the License at
   13.17 + * http://www.netbeans.org/cddl-gplv2.html
   13.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   13.19 + * specific language governing permissions and limitations under the
   13.20 + * License.  When distributing the software, include this License Header
   13.21 + * Notice in each file and include the License file at
   13.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   13.23 + * particular file as subject to the "Classpath" exception as provided
   13.24 + * by Oracle in the GPL Version 2 section of the License file that
   13.25 + * accompanied this code. If applicable, add the following below the
   13.26 + * License Header, with the fields enclosed by brackets [] replaced by
   13.27 + * your own identifying information:
   13.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   13.29 + *
   13.30 + * Contributor(s):
   13.31 + *
   13.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   13.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   13.34 + * Microsystems, Inc. All Rights Reserved.
   13.35 + *
   13.36 + * If you wish your version of this file to be governed by only the CDDL
   13.37 + * or only the GPL Version 2, indicate your decision by adding
   13.38 + * "[Contributor] elects to include this software in this distribution
   13.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   13.40 + * single choice of license, a recipient has the option to distribute
   13.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   13.42 + * to extend the choice of license to its licensees as provided above.
   13.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   13.44 + * Version 2 license, then the option applies only if the new code is
   13.45 + * made subject to such option by the copyright holder.
   13.46 + */
   13.47 +
   13.48 +
   13.49 +package org.netbeans.performance.uml;
   13.50 +
   13.51 +import org.netbeans.junit.NbModuleSuite;
   13.52 +import org.netbeans.junit.NbTestSuite;
   13.53 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   13.54 +import org.netbeans.performance.uml.menus.*;
   13.55 +
   13.56 +/**
   13.57 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   13.58 + *
   13.59 + * @author mmirilovic@netbeans.org, mrkam@netbeans.org
   13.60 + */
   13.61 +public class MeasureUMLMenusTest  {
   13.62 +
   13.63 +    public static NbTestSuite suite() {
   13.64 +        PerformanceTestCase.prepareForMeasurements();
   13.65 +
   13.66 +        NbTestSuite suite = new NbTestSuite("UI Responsiveness UML Menus suite");
   13.67 +        System.setProperty("suitename", MeasureUMLMenusTest.class.getCanonicalName());
   13.68 +
   13.69 +        suite.addTest(NbModuleSuite.create(NbModuleSuite.createConfiguration(MultipleNodeContextMenu.class)
   13.70 +                .addTest(MultipleNodeContextMenu.class, "measureTime")
   13.71 +                .enableModules(".*").clusters(".*").reuseUserDir(true)));
   13.72 +
   13.73 +        return suite;
   13.74 +    }
   13.75 +    
   13.76 +}
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/MeasureUMLSetupTest.java	Tue Jun 28 16:36:36 2011 -0400
    14.3 @@ -0,0 +1,85 @@
    14.4 +/*
    14.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    14.6 + *
    14.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    14.8 + *
    14.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   14.10 + * Other names may be trademarks of their respective owners.
   14.11 + *
   14.12 + * The contents of this file are subject to the terms of either the GNU
   14.13 + * General Public License Version 2 only ("GPL") or the Common
   14.14 + * Development and Distribution License("CDDL") (collectively, the
   14.15 + * "License"). You may not use this file except in compliance with the
   14.16 + * License. You can obtain a copy of the License at
   14.17 + * http://www.netbeans.org/cddl-gplv2.html
   14.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   14.19 + * specific language governing permissions and limitations under the
   14.20 + * License.  When distributing the software, include this License Header
   14.21 + * Notice in each file and include the License file at
   14.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   14.23 + * particular file as subject to the "Classpath" exception as provided
   14.24 + * by Oracle in the GPL Version 2 section of the License file that
   14.25 + * accompanied this code. If applicable, add the following below the
   14.26 + * License Header, with the fields enclosed by brackets [] replaced by
   14.27 + * your own identifying information:
   14.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   14.29 + *
   14.30 + * Contributor(s):
   14.31 + *
   14.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   14.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   14.34 + * Microsystems, Inc. All Rights Reserved.
   14.35 + *
   14.36 + * If you wish your version of this file to be governed by only the CDDL
   14.37 + * or only the GPL Version 2, indicate your decision by adding
   14.38 + * "[Contributor] elects to include this software in this distribution
   14.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   14.40 + * single choice of license, a recipient has the option to distribute
   14.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   14.42 + * to extend the choice of license to its licensees as provided above.
   14.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   14.44 + * Version 2 license, then the option applies only if the new code is
   14.45 + * made subject to such option by the copyright holder.
   14.46 + */
   14.47 +
   14.48 +
   14.49 +package org.netbeans.performance.uml;
   14.50 +
   14.51 +import junit.framework.Test;
   14.52 +import org.netbeans.junit.NbModuleSuite;
   14.53 +import org.netbeans.performance.uml.setup.UMLSetup;
   14.54 +
   14.55 +import org.netbeans.junit.NbTestSuite;
   14.56 +
   14.57 +/**
   14.58 + * Test suite that actually does not perform any test but sets up user directory
   14.59 + * for UI responsiveness tests
   14.60 + *
   14.61 + * @author mrkam@netbeans.org
   14.62 + */
   14.63 +public class MeasureUMLSetupTest extends NbTestSuite {
   14.64 +
   14.65 +    public MeasureUMLSetupTest (java.lang.String testName) {
   14.66 +        super(testName);
   14.67 +    }
   14.68 +
   14.69 +    public static Test suite() {
   14.70 +        NbTestSuite suite = new NbTestSuite("UI Responsiveness Setup suite for UML Pack");
   14.71 +        System.setProperty("suitename", MeasureUMLSetupTest.class.getCanonicalName());
   14.72 +
   14.73 +        suite.addTest(NbModuleSuite.create(
   14.74 +            NbModuleSuite.createConfiguration(UMLSetup.class)
   14.75 +            .addTest("closeMemoryToolbar")
   14.76 +
   14.77 +            .addTest("openJEditModelProject")
   14.78 +            .addTest("openJEditProject")
   14.79 +
   14.80 +            .addTest("closeAllDocuments")
   14.81 +            .enableModules(".*")
   14.82 +            .clusters(".*")
   14.83 +        ));
   14.84 +
   14.85 +        return suite;
   14.86 +    }
   14.87 +    
   14.88 +}
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/UMLUtilities.java	Tue Jun 28 16:36:36 2011 -0400
    15.3 @@ -0,0 +1,64 @@
    15.4 +/*
    15.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    15.6 + *
    15.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    15.8 + *
    15.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   15.10 + * Other names may be trademarks of their respective owners.
   15.11 + *
   15.12 + * The contents of this file are subject to the terms of either the GNU
   15.13 + * General Public License Version 2 only ("GPL") or the Common
   15.14 + * Development and Distribution License("CDDL") (collectively, the
   15.15 + * "License"). You may not use this file except in compliance with the
   15.16 + * License. You can obtain a copy of the License at
   15.17 + * http://www.netbeans.org/cddl-gplv2.html
   15.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   15.19 + * specific language governing permissions and limitations under the
   15.20 + * License.  When distributing the software, include this License Header
   15.21 + * Notice in each file and include the License file at
   15.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   15.23 + * particular file as subject to the "Classpath" exception as provided
   15.24 + * by Oracle in the GPL Version 2 section of the License file that
   15.25 + * accompanied this code. If applicable, add the following below the
   15.26 + * License Header, with the fields enclosed by brackets [] replaced by
   15.27 + * your own identifying information:
   15.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   15.29 + *
   15.30 + * Contributor(s):
   15.31 + *
   15.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   15.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   15.34 + * Microsystems, Inc. All Rights Reserved.
   15.35 + *
   15.36 + * If you wish your version of this file to be governed by only the CDDL
   15.37 + * or only the GPL Version 2, indicate your decision by adding
   15.38 + * "[Contributor] elects to include this software in this distribution
   15.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   15.40 + * single choice of license, a recipient has the option to distribute
   15.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   15.42 + * to extend the choice of license to its licensees as provided above.
   15.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   15.44 + * Version 2 license, then the option applies only if the new code is
   15.45 + * made subject to such option by the copyright holder.
   15.46 + */
   15.47 +
   15.48 +
   15.49 +package org.netbeans.performance.uml;
   15.50 +
   15.51 +import org.netbeans.jellytools.ProjectsTabOperator;
   15.52 +import org.netbeans.jellytools.nodes.Node;
   15.53 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   15.54 +
   15.55 +/**
   15.56 + * Utilities for Performance tests, workarrounds, often used methods, ...
   15.57 + *
   15.58 + * @author  mmirilovic@netbeans.org
   15.59 + */
   15.60 +public class UMLUtilities extends CommonUtilities {
   15.61 +
   15.62 +    public static Node getProcessFilesNode(String project){
   15.63 +        String processNode = org.netbeans.jellytools.Bundle.getString("org.netbeans.modules.bpel.project.ui.Bundle", "LBL_Node_Sources");
   15.64 +        return new Node(new ProjectsTabOperator().getProjectRootNode(project),processNode);
   15.65 +    }
   15.66 +    
   15.67 +}
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/ApplyDesignPattern.java	Tue Jun 28 16:36:36 2011 -0400
    16.3 @@ -0,0 +1,144 @@
    16.4 +/*
    16.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    16.6 + *
    16.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    16.8 + *
    16.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   16.10 + * Other names may be trademarks of their respective owners.
   16.11 + *
   16.12 + * The contents of this file are subject to the terms of either the GNU
   16.13 + * General Public License Version 2 only ("GPL") or the Common
   16.14 + * Development and Distribution License("CDDL") (collectively, the
   16.15 + * "License"). You may not use this file except in compliance with the
   16.16 + * License. You can obtain a copy of the License at
   16.17 + * http://www.netbeans.org/cddl-gplv2.html
   16.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   16.19 + * specific language governing permissions and limitations under the
   16.20 + * License.  When distributing the software, include this License Header
   16.21 + * Notice in each file and include the License file at
   16.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   16.23 + * particular file as subject to the "Classpath" exception as provided
   16.24 + * by Oracle in the GPL Version 2 section of the License file that
   16.25 + * accompanied this code. If applicable, add the following below the
   16.26 + * License Header, with the fields enclosed by brackets [] replaced by
   16.27 + * your own identifying information:
   16.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   16.29 + *
   16.30 + * Contributor(s):
   16.31 + *
   16.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   16.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   16.34 + * Microsystems, Inc. All Rights Reserved.
   16.35 + *
   16.36 + * If you wish your version of this file to be governed by only the CDDL
   16.37 + * or only the GPL Version 2, indicate your decision by adding
   16.38 + * "[Contributor] elects to include this software in this distribution
   16.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   16.40 + * single choice of license, a recipient has the option to distribute
   16.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   16.42 + * to extend the choice of license to its licensees as provided above.
   16.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   16.44 + * Version 2 license, then the option applies only if the new code is
   16.45 + * made subject to such option by the copyright holder.
   16.46 + */
   16.47 +package org.netbeans.performance.uml.actions;
   16.48 +
   16.49 +
   16.50 +import org.netbeans.jellytools.ProjectsTabOperator;
   16.51 +import org.netbeans.jellytools.nodes.Node;
   16.52 +import org.netbeans.jellytools.TopComponentOperator;
   16.53 +import org.netbeans.jellytools.NbDialogOperator;
   16.54 +
   16.55 +import org.netbeans.jemmy.EventTool;
   16.56 +import org.netbeans.jemmy.operators.JButtonOperator;
   16.57 +import org.netbeans.jemmy.operators.JComboBoxOperator;
   16.58 +import org.netbeans.jemmy.operators.ComponentOperator;
   16.59 +import org.netbeans.jemmy.operators.JCheckBoxOperator;
   16.60 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   16.61 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   16.62 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   16.63 +
   16.64 +
   16.65 +
   16.66 +/**
   16.67 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   16.68 + *
   16.69 + * @author rashid@netbeans.org
   16.70 + *
   16.71 + */
   16.72 +public class ApplyDesignPattern extends PerformanceTestCase {
   16.73 +
   16.74 +    private static String testProjectName = "jEdit-Model";
   16.75 +    private Node diag;
   16.76 +    private NbDialogOperator d_wizard;
   16.77 +
   16.78 +    /** Creates a new instance of ApplyDesignPattern */
   16.79 +    public ApplyDesignPattern(String testName) {
   16.80 +        super(testName);
   16.81 +        expectedTime = 5000;
   16.82 +        WAIT_AFTER_OPEN = 4000;
   16.83 +    }
   16.84 +
   16.85 +    public ApplyDesignPattern(String testName, String performanceDataName) {
   16.86 +        super(testName, performanceDataName);
   16.87 +        expectedTime = 5000;
   16.88 +        WAIT_AFTER_OPEN = 4000;
   16.89 +    }
   16.90 +
   16.91 +    @Override
   16.92 +    public void initialize() {
   16.93 +        log(":: initialize");
   16.94 +
   16.95 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   16.96 +    }
   16.97 +
   16.98 +    public void prepare() {
   16.99 +        log(":: prepare");
  16.100 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
  16.101 +        diag = new Node(pNode, "Model");
  16.102 +        diag.select();
  16.103 +        diag.performPopupActionNoBlock("Apply Design Pattern");
  16.104 +        NbDialogOperator a_wizard = new NbDialogOperator("Design Pattern Apply Wizard");
  16.105 +        JButtonOperator a_wizard_next = new JButtonOperator(a_wizard, "Next");
  16.106 +        a_wizard_next.push();
  16.107 +
  16.108 +        d_wizard = new NbDialogOperator("Design Pattern Wizard");
  16.109 +        JButtonOperator d_wizard_next = new JButtonOperator(d_wizard, "Next");
  16.110 +        JComboBoxOperator projectCombo = new JComboBoxOperator(d_wizard);
  16.111 +        projectCombo.selectItem("EJB2.0");
  16.112 +
  16.113 +        d_wizard_next.push();
  16.114 +        new EventTool().waitNoEvent(1000);
  16.115 +        d_wizard_next.push();
  16.116 +        new EventTool().waitNoEvent(1000);
  16.117 +        d_wizard_next.push();
  16.118 +        JCheckBoxOperator d_wizardCheck = new JCheckBoxOperator(d_wizard, "Create class diagram");
  16.119 +        d_wizardCheck.doClick();
  16.120 +        d_wizard_next.push();
  16.121 +    }
  16.122 +
  16.123 +    public ComponentOperator open() {
  16.124 +        log("::open");
  16.125 +
  16.126 +        JButtonOperator d_wizard_finish = new JButtonOperator(d_wizard, "Finish");
  16.127 +        d_wizard_finish.push();
  16.128 +
  16.129 +        return new TopComponentOperator("BeanManagedDiagram");
  16.130 +
  16.131 +    }
  16.132 +
  16.133 +    @Override
  16.134 +    protected void shutdown() {
  16.135 +        log("::shutdown");
  16.136 +        ProjectSupport.closeProject(testProjectName);
  16.137 +    }
  16.138 +
  16.139 +    @Override
  16.140 +    public void close() {
  16.141 +        log("::close");
  16.142 +    }
  16.143 +
  16.144 +//    public static void main(java.lang.String[] args) {
  16.145 +//        junit.textui.TestRunner.run(new ApplyDesignPattern("measureTime"));
  16.146 +//    }
  16.147 +}
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/CodeGenerationFromUMLProject.java	Tue Jun 28 16:36:36 2011 -0400
    17.3 @@ -0,0 +1,122 @@
    17.4 +/*
    17.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    17.6 + *
    17.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    17.8 + *
    17.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   17.10 + * Other names may be trademarks of their respective owners.
   17.11 + *
   17.12 + * The contents of this file are subject to the terms of either the GNU
   17.13 + * General Public License Version 2 only ("GPL") or the Common
   17.14 + * Development and Distribution License("CDDL") (collectively, the
   17.15 + * "License"). You may not use this file except in compliance with the
   17.16 + * License. You can obtain a copy of the License at
   17.17 + * http://www.netbeans.org/cddl-gplv2.html
   17.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   17.19 + * specific language governing permissions and limitations under the
   17.20 + * License.  When distributing the software, include this License Header
   17.21 + * Notice in each file and include the License file at
   17.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   17.23 + * particular file as subject to the "Classpath" exception as provided
   17.24 + * by Oracle in the GPL Version 2 section of the License file that
   17.25 + * accompanied this code. If applicable, add the following below the
   17.26 + * License Header, with the fields enclosed by brackets [] replaced by
   17.27 + * your own identifying information:
   17.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   17.29 + *
   17.30 + * Contributor(s):
   17.31 + *
   17.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   17.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   17.34 + * Microsystems, Inc. All Rights Reserved.
   17.35 + *
   17.36 + * If you wish your version of this file to be governed by only the CDDL
   17.37 + * or only the GPL Version 2, indicate your decision by adding
   17.38 + * "[Contributor] elects to include this software in this distribution
   17.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   17.40 + * single choice of license, a recipient has the option to distribute
   17.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   17.42 + * to extend the choice of license to its licensees as provided above.
   17.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   17.44 + * Version 2 license, then the option applies only if the new code is
   17.45 + * made subject to such option by the copyright holder.
   17.46 + */
   17.47 +package org.netbeans.performance.uml.actions;
   17.48 +
   17.49 +
   17.50 +import org.netbeans.jellytools.ProjectsTabOperator;
   17.51 +import org.netbeans.jellytools.nodes.Node;
   17.52 +import org.netbeans.jellytools.OutputOperator;
   17.53 +import org.netbeans.jellytools.OutputTabOperator;
   17.54 +import org.netbeans.jellytools.NbDialogOperator;
   17.55 +
   17.56 +import org.netbeans.jemmy.operators.ComponentOperator;
   17.57 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   17.58 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   17.59 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   17.60 +
   17.61 +
   17.62 +
   17.63 +/**
   17.64 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   17.65 + *
   17.66 + * @author rashid@netbeans.org
   17.67 + *
   17.68 + */
   17.69 +public class CodeGenerationFromUMLProject extends PerformanceTestCase {
   17.70 +
   17.71 +    private static String testProjectName = "jEdit-Model";
   17.72 +    private NbDialogOperator codeDialog;
   17.73 +
   17.74 +    /** Creates a new instance of GenerateModelReport */
   17.75 +    public CodeGenerationFromUMLProject(String testName) {
   17.76 +        super(testName);
   17.77 +        expectedTime = 10000;
   17.78 +        WAIT_AFTER_OPEN = 4000;
   17.79 +    }
   17.80 +
   17.81 +    public CodeGenerationFromUMLProject(String testName, String performanceDataName) {
   17.82 +        super(testName, performanceDataName);
   17.83 +        expectedTime = 10000;
   17.84 +        WAIT_AFTER_OPEN = 4000;
   17.85 +    }
   17.86 +
   17.87 +    @Override
   17.88 +    public void initialize() {
   17.89 +        log(":: initialize");
   17.90 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   17.91 +    }
   17.92 +
   17.93 +    public void prepare() {
   17.94 +        log(":: prepare");
   17.95 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
   17.96 +        pNode.performPopupActionNoBlock("Generate Code...");
   17.97 +    }
   17.98 +
   17.99 +    public ComponentOperator open() {
  17.100 +        log("::open");
  17.101 +        codeDialog = new NbDialogOperator("Generate Code");
  17.102 +        codeDialog.ok();
  17.103 +        OutputOperator oot = new OutputOperator();
  17.104 +        oot.getTimeouts().setTimeout("ComponentOperator.WaitStateTimeout", 600000);
  17.105 +        OutputTabOperator asot = oot.getOutputTab("Generate Code Log");
  17.106 +        asot.getTimeouts().setTimeout("ComponentOperator.WaitStateTimeout", 600000);
  17.107 +        asot.waitText("Task Successful");
  17.108 +        return null;
  17.109 +    }
  17.110 +
  17.111 +    @Override
  17.112 +    protected void shutdown() {
  17.113 +        log("::shutdown");
  17.114 +        ProjectSupport.closeProject(testProjectName);
  17.115 +    }
  17.116 +
  17.117 +    @Override
  17.118 +    public void close() {
  17.119 +        log("::close");
  17.120 +    }
  17.121 +
  17.122 +//    public static void main(java.lang.String[] args) {
  17.123 +//        junit.textui.TestRunner.run(new CodeGenerationFromUMLProject("measureTime"));
  17.124 +//    }
  17.125 +}
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/CreateClassDiagramFromMultipleNodes.java	Tue Jun 28 16:36:36 2011 -0400
    18.3 @@ -0,0 +1,154 @@
    18.4 +/*
    18.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    18.6 + *
    18.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    18.8 + *
    18.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   18.10 + * Other names may be trademarks of their respective owners.
   18.11 + *
   18.12 + * The contents of this file are subject to the terms of either the GNU
   18.13 + * General Public License Version 2 only ("GPL") or the Common
   18.14 + * Development and Distribution License("CDDL") (collectively, the
   18.15 + * "License"). You may not use this file except in compliance with the
   18.16 + * License. You can obtain a copy of the License at
   18.17 + * http://www.netbeans.org/cddl-gplv2.html
   18.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   18.19 + * specific language governing permissions and limitations under the
   18.20 + * License.  When distributing the software, include this License Header
   18.21 + * Notice in each file and include the License file at
   18.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   18.23 + * particular file as subject to the "Classpath" exception as provided
   18.24 + * by Oracle in the GPL Version 2 section of the License file that
   18.25 + * accompanied this code. If applicable, add the following below the
   18.26 + * License Header, with the fields enclosed by brackets [] replaced by
   18.27 + * your own identifying information:
   18.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   18.29 + *
   18.30 + * Contributor(s):
   18.31 + *
   18.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   18.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   18.34 + * Microsystems, Inc. All Rights Reserved.
   18.35 + *
   18.36 + * If you wish your version of this file to be governed by only the CDDL
   18.37 + * or only the GPL Version 2, indicate your decision by adding
   18.38 + * "[Contributor] elects to include this software in this distribution
   18.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   18.40 + * single choice of license, a recipient has the option to distribute
   18.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   18.42 + * to extend the choice of license to its licensees as provided above.
   18.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   18.44 + * Version 2 license, then the option applies only if the new code is
   18.45 + * made subject to such option by the copyright holder.
   18.46 + */
   18.47 +package org.netbeans.performance.uml.actions;
   18.48 +
   18.49 +import java.awt.event.InputEvent;
   18.50 +
   18.51 +
   18.52 +import javax.swing.tree.TreePath;
   18.53 +import org.netbeans.jellytools.ProjectsTabOperator;
   18.54 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   18.55 +import org.netbeans.jellytools.nodes.Node;
   18.56 +import org.netbeans.jellytools.NbDialogOperator;
   18.57 +
   18.58 +
   18.59 +
   18.60 +import org.netbeans.jemmy.operators.JTreeOperator;
   18.61 +import org.netbeans.jemmy.operators.JPopupMenuOperator;
   18.62 +import org.netbeans.jemmy.EventTool;
   18.63 +import org.netbeans.jemmy.operators.ComponentOperator;
   18.64 +import org.netbeans.jemmy.operators.JListOperator;
   18.65 +import org.netbeans.jemmy.operators.JButtonOperator;
   18.66 +import org.netbeans.jemmy.operators.JComboBoxOperator;
   18.67 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   18.68 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   18.69 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   18.70 +
   18.71 +/**
   18.72 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   18.73 + *
   18.74 + * @author rashid@netbeans.org
   18.75 + *
   18.76 + */
   18.77 +public class CreateClassDiagramFromMultipleNodes extends PerformanceTestCase {
   18.78 +
   18.79 +    private static String testProjectName = "jEdit-Model";
   18.80 +    private NbDialogOperator create_diag;
   18.81 +
   18.82 +    /** Creates a new instance of CreateClassDiagramFromMultipleNodes */
   18.83 +    public CreateClassDiagramFromMultipleNodes(String testName) {
   18.84 +        super(testName);
   18.85 +        expectedTime = 5000;
   18.86 +        WAIT_AFTER_OPEN = 4000;
   18.87 +    }
   18.88 +
   18.89 +    public CreateClassDiagramFromMultipleNodes(String testName, String performanceDataName) {
   18.90 +        super(testName, performanceDataName);
   18.91 +        expectedTime = 5000;
   18.92 +        WAIT_AFTER_OPEN = 4000;
   18.93 +    }
   18.94 +
   18.95 +    @Override
   18.96 +    public void initialize() {
   18.97 +        log(":: initialize");
   18.98 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   18.99 +    }
  18.100 +
  18.101 +    public void prepare() {
  18.102 +        log(":: prepare");
  18.103 +
  18.104 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
  18.105 +        Node diag1 = new Node(pNode, "Model|org|gjt|sp|jedit|gui|AbbrevEditor");
  18.106 +        Node diag2 = new Node(pNode, "Model|org|gjt|sp|jedit|gui|IOProgressMonitor");
  18.107 +        JTreeOperator projectTree = new ProjectsTabOperator().tree();
  18.108 +
  18.109 +        TreePath path1 = diag1.getTreePath();
  18.110 +        TreePath path2 = diag2.getTreePath();
  18.111 +
  18.112 +        projectTree.clickOnPath(path1, 1, InputEvent.BUTTON1_MASK);
  18.113 +        new EventTool().waitNoEvent(500);
  18.114 +        projectTree.clickOnPath(path2, 1, InputEvent.BUTTON1_MASK, InputEvent.SHIFT_MASK);
  18.115 +        new EventTool().waitNoEvent(2000);
  18.116 +        projectTree.clickOnPath(path2, 1, InputEvent.BUTTON3_MASK);
  18.117 +
  18.118 +        log(projectTree.getSelectionCount() + " elements selected");
  18.119 +
  18.120 +        JPopupMenuOperator selectMenu = new JPopupMenuOperator();
  18.121 +
  18.122 +        selectMenu.pushMenu("Create Diagram From Selected Elements");
  18.123 +
  18.124 +        create_diag = new NbDialogOperator("Create New Diagram");
  18.125 +        create_diag.move(0, 0);
  18.126 +        new EventTool().waitNoEvent(1000);
  18.127 +        JListOperator diag_type = new JListOperator(create_diag, 1);
  18.128 +        diag_type.selectItem("Class Diagram");
  18.129 +        JComboBoxOperator spaceCombo = new JComboBoxOperator(create_diag);
  18.130 +        spaceCombo.selectItem("jEdit-Model");
  18.131 +    }
  18.132 +
  18.133 +    public ComponentOperator open() {
  18.134 +        log("::open");
  18.135 +
  18.136 +        JButtonOperator finishButton = new JButtonOperator(create_diag, "Finish");
  18.137 +        finishButton.push();
  18.138 +
  18.139 +        return null;
  18.140 +    }
  18.141 +
  18.142 +    @Override
  18.143 +    protected void shutdown() {
  18.144 +        log("::shutdown");
  18.145 +        ProjectSupport.closeProject(testProjectName);
  18.146 +    }
  18.147 +
  18.148 +    @Override
  18.149 +    public void close() {
  18.150 +        log("::close");
  18.151 +        new CloseAllDocumentsAction().performAPI();
  18.152 +    }
  18.153 +
  18.154 +//    public static void main(java.lang.String[] args) {
  18.155 +//        junit.textui.TestRunner.run(new CreateClassDiagramFromMultipleNodes("measureTime"));
  18.156 +//    }
  18.157 +}
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/CreateEmptyDiagram.java	Tue Jun 28 16:36:36 2011 -0400
    19.3 @@ -0,0 +1,130 @@
    19.4 +/*
    19.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    19.6 + *
    19.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    19.8 + *
    19.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   19.10 + * Other names may be trademarks of their respective owners.
   19.11 + *
   19.12 + * The contents of this file are subject to the terms of either the GNU
   19.13 + * General Public License Version 2 only ("GPL") or the Common
   19.14 + * Development and Distribution License("CDDL") (collectively, the
   19.15 + * "License"). You may not use this file except in compliance with the
   19.16 + * License. You can obtain a copy of the License at
   19.17 + * http://www.netbeans.org/cddl-gplv2.html
   19.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   19.19 + * specific language governing permissions and limitations under the
   19.20 + * License.  When distributing the software, include this License Header
   19.21 + * Notice in each file and include the License file at
   19.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   19.23 + * particular file as subject to the "Classpath" exception as provided
   19.24 + * by Oracle in the GPL Version 2 section of the License file that
   19.25 + * accompanied this code. If applicable, add the following below the
   19.26 + * License Header, with the fields enclosed by brackets [] replaced by
   19.27 + * your own identifying information:
   19.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   19.29 + *
   19.30 + * Contributor(s):
   19.31 + *
   19.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   19.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   19.34 + * Microsystems, Inc. All Rights Reserved.
   19.35 + *
   19.36 + * If you wish your version of this file to be governed by only the CDDL
   19.37 + * or only the GPL Version 2, indicate your decision by adding
   19.38 + * "[Contributor] elects to include this software in this distribution
   19.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   19.40 + * single choice of license, a recipient has the option to distribute
   19.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   19.42 + * to extend the choice of license to its licensees as provided above.
   19.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   19.44 + * Version 2 license, then the option applies only if the new code is
   19.45 + * made subject to such option by the copyright holder.
   19.46 + */
   19.47 +package org.netbeans.performance.uml.actions;
   19.48 +
   19.49 +
   19.50 +import org.netbeans.jellytools.ProjectsTabOperator;
   19.51 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   19.52 +import org.netbeans.jellytools.nodes.Node;
   19.53 +import org.netbeans.jellytools.NbDialogOperator;
   19.54 +
   19.55 +import org.netbeans.jemmy.EventTool;
   19.56 +import org.netbeans.jemmy.operators.ComponentOperator;
   19.57 +import org.netbeans.jemmy.operators.JListOperator;
   19.58 +import org.netbeans.jemmy.operators.JButtonOperator;
   19.59 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   19.60 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   19.61 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   19.62 +
   19.63 +
   19.64 +
   19.65 +/**
   19.66 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   19.67 + *
   19.68 + * @author rashid@netbeans.org
   19.69 + *
   19.70 + */
   19.71 +public class CreateEmptyDiagram extends PerformanceTestCase {
   19.72 +
   19.73 +    private String testProjectName = "jEdit-Model";
   19.74 +    private NbDialogOperator create_diag;
   19.75 +
   19.76 +    /** Creates a new instance of CreateEmptyDiagram */
   19.77 +    public CreateEmptyDiagram(String testName) {
   19.78 +        super(testName);
   19.79 +        expectedTime = 5000;
   19.80 +        WAIT_AFTER_OPEN = 4000;
   19.81 +    }
   19.82 +
   19.83 +    public CreateEmptyDiagram(String testName, String performanceDataName) {
   19.84 +        super(testName, performanceDataName);
   19.85 +        expectedTime = 5000;
   19.86 +        WAIT_AFTER_OPEN = 4000;
   19.87 +    }
   19.88 +
   19.89 +    @Override
   19.90 +    public void initialize() {
   19.91 +        log(":: initialize");
   19.92 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   19.93 +    }
   19.94 +
   19.95 +    public void prepare() {
   19.96 +        log(":: prepare");
   19.97 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
   19.98 +        Node doc = new Node(pNode, "Diagrams");
   19.99 +        doc.select();
  19.100 +
  19.101 +        doc.performPopupAction("New|Diagram...");
  19.102 +        create_diag = new NbDialogOperator("Create New Diagram");
  19.103 +        new EventTool().waitNoEvent(2000);
  19.104 +        JListOperator diag_type = new JListOperator(create_diag, 1);
  19.105 +
  19.106 +        diag_type.selectItem("Class Diagram");
  19.107 +    }
  19.108 +
  19.109 +    public ComponentOperator open() {
  19.110 +        log("::open");
  19.111 +
  19.112 +        JButtonOperator finishButton = new JButtonOperator(create_diag, "Finish");
  19.113 +        finishButton.push();
  19.114 +
  19.115 +        return null;
  19.116 +    }
  19.117 +
  19.118 +    @Override
  19.119 +    protected void shutdown() {
  19.120 +        log("::shutdown");
  19.121 +        ProjectSupport.closeProject(testProjectName);
  19.122 +    }
  19.123 +
  19.124 +    @Override
  19.125 +    public void close() {
  19.126 +        log("::close");
  19.127 +        new CloseAllDocumentsAction().performAPI();
  19.128 +    }
  19.129 +
  19.130 +//    public static void main(java.lang.String[] args) {
  19.131 +//        junit.textui.TestRunner.run(new CreateEmptyDiagram("measureTime"));
  19.132 +//    }
  19.133 +}
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/CreateSequenceDiagramFromMultipleNodes.java	Tue Jun 28 16:36:36 2011 -0400
    20.3 @@ -0,0 +1,158 @@
    20.4 +/*
    20.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    20.6 + *
    20.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    20.8 + *
    20.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   20.10 + * Other names may be trademarks of their respective owners.
   20.11 + *
   20.12 + * The contents of this file are subject to the terms of either the GNU
   20.13 + * General Public License Version 2 only ("GPL") or the Common
   20.14 + * Development and Distribution License("CDDL") (collectively, the
   20.15 + * "License"). You may not use this file except in compliance with the
   20.16 + * License. You can obtain a copy of the License at
   20.17 + * http://www.netbeans.org/cddl-gplv2.html
   20.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   20.19 + * specific language governing permissions and limitations under the
   20.20 + * License.  When distributing the software, include this License Header
   20.21 + * Notice in each file and include the License file at
   20.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   20.23 + * particular file as subject to the "Classpath" exception as provided
   20.24 + * by Oracle in the GPL Version 2 section of the License file that
   20.25 + * accompanied this code. If applicable, add the following below the
   20.26 + * License Header, with the fields enclosed by brackets [] replaced by
   20.27 + * your own identifying information:
   20.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   20.29 + *
   20.30 + * Contributor(s):
   20.31 + *
   20.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   20.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   20.34 + * Microsystems, Inc. All Rights Reserved.
   20.35 + *
   20.36 + * If you wish your version of this file to be governed by only the CDDL
   20.37 + * or only the GPL Version 2, indicate your decision by adding
   20.38 + * "[Contributor] elects to include this software in this distribution
   20.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   20.40 + * single choice of license, a recipient has the option to distribute
   20.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   20.42 + * to extend the choice of license to its licensees as provided above.
   20.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   20.44 + * Version 2 license, then the option applies only if the new code is
   20.45 + * made subject to such option by the copyright holder.
   20.46 + */
   20.47 +package org.netbeans.performance.uml.actions;
   20.48 +
   20.49 +import java.awt.event.InputEvent;
   20.50 +
   20.51 +import javax.swing.tree.TreePath;
   20.52 +
   20.53 +import org.netbeans.jellytools.MainWindowOperator;
   20.54 +import org.netbeans.jellytools.ProjectsTabOperator;
   20.55 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   20.56 +import org.netbeans.jellytools.nodes.Node;
   20.57 +import org.netbeans.jellytools.NbDialogOperator;
   20.58 +
   20.59 +
   20.60 +
   20.61 +import org.netbeans.jemmy.EventTool;
   20.62 +import org.netbeans.jemmy.operators.ComponentOperator;
   20.63 +import org.netbeans.jemmy.operators.JTreeOperator;
   20.64 +import org.netbeans.jemmy.operators.JPopupMenuOperator;
   20.65 +import org.netbeans.jemmy.operators.JListOperator;
   20.66 +import org.netbeans.jemmy.operators.JButtonOperator;
   20.67 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   20.68 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   20.69 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   20.70 +
   20.71 +/**
   20.72 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   20.73 + *
   20.74 + * @author rashid@netbeans.org
   20.75 + *
   20.76 + */
   20.77 +public class CreateSequenceDiagramFromMultipleNodes extends PerformanceTestCase {
   20.78 +
   20.79 +    private static String testProjectName = "jEdit-Model";
   20.80 +    private NbDialogOperator create_diag;
   20.81 +
   20.82 +    /** Creates a new instance of CreateSequenceDiagramFromMultipleNodes */
   20.83 +    public CreateSequenceDiagramFromMultipleNodes(String testName) {
   20.84 +        super(testName);
   20.85 +        expectedTime = 5000;
   20.86 +        WAIT_AFTER_OPEN = 4000;
   20.87 +    }
   20.88 +
   20.89 +    public CreateSequenceDiagramFromMultipleNodes(String testName, String performanceDataName) {
   20.90 +        super(testName, performanceDataName);
   20.91 +        expectedTime = 5000;
   20.92 +        WAIT_AFTER_OPEN = 4000;
   20.93 +    }
   20.94 +
   20.95 +    @Override
   20.96 +    public void initialize() {
   20.97 +        log(":: initialize");
   20.98 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   20.99 +        MainWindowOperator.getDefault().maximize();        
  20.100 +        new EventTool().waitNoEvent(500);
  20.101 +    }
  20.102 +
  20.103 +    public void prepare() {
  20.104 +        log(":: prepare");
  20.105 +        new EventTool().waitNoEvent(1000);
  20.106 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
  20.107 +        Node diag1 = new Node(pNode, "Model|org|gjt|sp|jedit|gui|AbbrevEditor");
  20.108 +        Node diag2 = new Node(pNode, "Model|org|gjt|sp|jedit|gui|IOProgressMonitor");
  20.109 +        JTreeOperator projectTree = new ProjectsTabOperator().tree();
  20.110 +
  20.111 +        TreePath path1 = diag1.getTreePath();
  20.112 +        TreePath path2 = diag2.getTreePath();
  20.113 +
  20.114 +        projectTree.clickOnPath(path1, 1, InputEvent.BUTTON1_MASK);
  20.115 +        new EventTool().waitNoEvent(500);
  20.116 +        projectTree.clickOnPath(path2, 1, InputEvent.BUTTON1_MASK, InputEvent.SHIFT_MASK);
  20.117 +        new EventTool().waitNoEvent(2000);
  20.118 +        projectTree.clickOnPath(path2, 1, InputEvent.BUTTON3_MASK);
  20.119 +
  20.120 +        log(projectTree.getSelectionCount() + " elements selected");
  20.121 +        if (projectTree.getSelectionCount() != 30) {
  20.122 +            for(TreePath tp : projectTree.getSelectionPaths()) {
  20.123 +                log(tp.toString());
  20.124 +            }
  20.125 +        }
  20.126 +
  20.127 +        JPopupMenuOperator selectMenu = new JPopupMenuOperator();
  20.128 +        selectMenu.pushMenu("Create Diagram From Selected Elements");
  20.129 +
  20.130 +        create_diag = new NbDialogOperator("Create New Diagram");
  20.131 +        new EventTool().waitNoEvent(1000);
  20.132 +        JListOperator diag_type = new JListOperator(create_diag, 1);
  20.133 +        diag_type.selectItem("Sequence Diagram");
  20.134 +
  20.135 +    }
  20.136 +
  20.137 +    public ComponentOperator open() {
  20.138 +        log("::open");
  20.139 +
  20.140 +        JButtonOperator finishButton = new JButtonOperator(create_diag, "Finish");
  20.141 +        finishButton.push();
  20.142 +
  20.143 +        return null;
  20.144 +    }
  20.145 +
  20.146 +    @Override
  20.147 +    protected void shutdown() {
  20.148 +        log("::shutdown");
  20.149 +        ProjectSupport.closeProject(testProjectName);
  20.150 +    }
  20.151 +
  20.152 +    @Override
  20.153 +    public void close() {
  20.154 +        log("::close");
  20.155 +        new CloseAllDocumentsAction().performAPI();
  20.156 +    }
  20.157 +
  20.158 +//    public static void main(java.lang.String[] args) {
  20.159 +//        junit.textui.TestRunner.run(new CreateSequenceDiagramFromMultipleNodes("measureTime"));
  20.160 +//    }
  20.161 +}
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/GenerateDependencyDiagram.java	Tue Jun 28 16:36:36 2011 -0400
    21.3 @@ -0,0 +1,124 @@
    21.4 +/*
    21.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    21.6 + *
    21.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    21.8 + *
    21.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   21.10 + * Other names may be trademarks of their respective owners.
   21.11 + *
   21.12 + * The contents of this file are subject to the terms of either the GNU
   21.13 + * General Public License Version 2 only ("GPL") or the Common
   21.14 + * Development and Distribution License("CDDL") (collectively, the
   21.15 + * "License"). You may not use this file except in compliance with the
   21.16 + * License. You can obtain a copy of the License at
   21.17 + * http://www.netbeans.org/cddl-gplv2.html
   21.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   21.19 + * specific language governing permissions and limitations under the
   21.20 + * License.  When distributing the software, include this License Header
   21.21 + * Notice in each file and include the License file at
   21.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   21.23 + * particular file as subject to the "Classpath" exception as provided
   21.24 + * by Oracle in the GPL Version 2 section of the License file that
   21.25 + * accompanied this code. If applicable, add the following below the
   21.26 + * License Header, with the fields enclosed by brackets [] replaced by
   21.27 + * your own identifying information:
   21.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   21.29 + *
   21.30 + * Contributor(s):
   21.31 + *
   21.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   21.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   21.34 + * Microsystems, Inc. All Rights Reserved.
   21.35 + *
   21.36 + * If you wish your version of this file to be governed by only the CDDL
   21.37 + * or only the GPL Version 2, indicate your decision by adding
   21.38 + * "[Contributor] elects to include this software in this distribution
   21.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   21.40 + * single choice of license, a recipient has the option to distribute
   21.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   21.42 + * to extend the choice of license to its licensees as provided above.
   21.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   21.44 + * Version 2 license, then the option applies only if the new code is
   21.45 + * made subject to such option by the copyright holder.
   21.46 + */
   21.47 +package org.netbeans.performance.uml.actions;
   21.48 +
   21.49 +
   21.50 +import org.netbeans.jellytools.ProjectsTabOperator;
   21.51 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   21.52 +import org.netbeans.jellytools.nodes.Node;
   21.53 +import org.netbeans.jellytools.TopComponentOperator;
   21.54 +
   21.55 +import org.netbeans.jemmy.EventTool;
   21.56 +import org.netbeans.jemmy.operators.ComponentOperator;
   21.57 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   21.58 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   21.59 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   21.60 +
   21.61 +
   21.62 +
   21.63 +/**
   21.64 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   21.65 + *
   21.66 + * @author rashid@netbeans.org
   21.67 + *
   21.68 + */
   21.69 +public class GenerateDependencyDiagram extends PerformanceTestCase {
   21.70 +
   21.71 +    private static String testProjectName = "jEdit-Model";
   21.72 +    private static String testDiagramName = "jEdit";
   21.73 +    private Node diag;
   21.74 +    public static final long EXPECTED_TIME = 5000;
   21.75 +
   21.76 +    /** Creates a new instance of GenerateDependencyDiagram */
   21.77 +    public GenerateDependencyDiagram(String testName) {
   21.78 +        super(testName);
   21.79 +        expectedTime = EXPECTED_TIME;
   21.80 +        WAIT_AFTER_OPEN = 4000;
   21.81 +    }
   21.82 +
   21.83 +    public GenerateDependencyDiagram(String testName, String performanceDataName) {
   21.84 +        super(testName, performanceDataName);
   21.85 +        expectedTime = EXPECTED_TIME;
   21.86 +        WAIT_AFTER_OPEN = 4000;
   21.87 +    }
   21.88 +
   21.89 +    @Override
   21.90 +    public void initialize() {
   21.91 +        log(":: initialize");
   21.92 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   21.93 +    }
   21.94 +
   21.95 +    public void prepare() {
   21.96 +        log(":: prepare");
   21.97 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
   21.98 +        diag = new Node(pNode, "Model" + "|" + "org" + "|" + "gjt" + "|" + "sp" + "|" + "jedit" + "|" + testDiagramName);
   21.99 +        diag.select();
  21.100 +    }
  21.101 +
  21.102 +    public ComponentOperator open() {
  21.103 +        log("::open");
  21.104 +        new EventTool().waitNoEvent(2000);
  21.105 +        diag.performPopupAction("Generate Dependency Diagram");
  21.106 +        return new TopComponentOperator("jEditDependencies");
  21.107 +
  21.108 +    }
  21.109 +
  21.110 +    @Override
  21.111 +    protected void shutdown() {
  21.112 +        log("::shutdown");
  21.113 +        ProjectSupport.closeProject(testProjectName);
  21.114 +//        new CloseAllDocumentsAction().performAPI();
  21.115 +    }
  21.116 +
  21.117 +    @Override
  21.118 +    public void close() {
  21.119 +        log("::close");
  21.120 +        new CloseAllDocumentsAction().performAPI();
  21.121 +
  21.122 +    }
  21.123 +
  21.124 +//    public static void main(java.lang.String[] args) {
  21.125 +//        junit.textui.TestRunner.run(new GenerateDependencyDiagram("measureTime"));
  21.126 +//    }
  21.127 +}
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/GenerateModelReport.java	Tue Jun 28 16:36:36 2011 -0400
    22.3 @@ -0,0 +1,117 @@
    22.4 +/*
    22.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    22.6 + *
    22.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    22.8 + *
    22.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   22.10 + * Other names may be trademarks of their respective owners.
   22.11 + *
   22.12 + * The contents of this file are subject to the terms of either the GNU
   22.13 + * General Public License Version 2 only ("GPL") or the Common
   22.14 + * Development and Distribution License("CDDL") (collectively, the
   22.15 + * "License"). You may not use this file except in compliance with the
   22.16 + * License. You can obtain a copy of the License at
   22.17 + * http://www.netbeans.org/cddl-gplv2.html
   22.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   22.19 + * specific language governing permissions and limitations under the
   22.20 + * License.  When distributing the software, include this License Header
   22.21 + * Notice in each file and include the License file at
   22.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   22.23 + * particular file as subject to the "Classpath" exception as provided
   22.24 + * by Oracle in the GPL Version 2 section of the License file that
   22.25 + * accompanied this code. If applicable, add the following below the
   22.26 + * License Header, with the fields enclosed by brackets [] replaced by
   22.27 + * your own identifying information:
   22.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   22.29 + *
   22.30 + * Contributor(s):
   22.31 + *
   22.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   22.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   22.34 + * Microsystems, Inc. All Rights Reserved.
   22.35 + *
   22.36 + * If you wish your version of this file to be governed by only the CDDL
   22.37 + * or only the GPL Version 2, indicate your decision by adding
   22.38 + * "[Contributor] elects to include this software in this distribution
   22.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   22.40 + * single choice of license, a recipient has the option to distribute
   22.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   22.42 + * to extend the choice of license to its licensees as provided above.
   22.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   22.44 + * Version 2 license, then the option applies only if the new code is
   22.45 + * made subject to such option by the copyright holder.
   22.46 + */
   22.47 +package org.netbeans.performance.uml.actions;
   22.48 +
   22.49 +
   22.50 +import org.netbeans.jellytools.ProjectsTabOperator;
   22.51 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   22.52 +import org.netbeans.jellytools.nodes.Node;
   22.53 +import org.netbeans.jellytools.OutputOperator;
   22.54 +import org.netbeans.jellytools.OutputTabOperator;
   22.55 +
   22.56 +import org.netbeans.jemmy.operators.ComponentOperator;
   22.57 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   22.58 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   22.59 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   22.60 +
   22.61 +
   22.62 +/**
   22.63 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   22.64 + *
   22.65 + * @author rashid@netbeans.org
   22.66 + *
   22.67 + */
   22.68 +public class GenerateModelReport extends PerformanceTestCase {
   22.69 +
   22.70 +    private static String testProjectName = "jEdit-Model";
   22.71 +
   22.72 +    /** Creates a new instance of GenerateModelReport */
   22.73 +    public GenerateModelReport(String testName) {
   22.74 +        super(testName);
   22.75 +        expectedTime = 300000;
   22.76 +        WAIT_AFTER_OPEN = 4000;
   22.77 +    }
   22.78 +
   22.79 +    public GenerateModelReport(String testName, String performanceDataName) {
   22.80 +        super(testName, performanceDataName);
   22.81 +        expectedTime = 300000;
   22.82 +        WAIT_AFTER_OPEN = 4000;
   22.83 +    }
   22.84 +
   22.85 +    @Override
   22.86 +    public void initialize() {
   22.87 +        log(":: initialize");
   22.88 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   22.89 +    }
   22.90 +
   22.91 +    public void prepare() {
   22.92 +        log(":: prepare");
   22.93 +    }
   22.94 +
   22.95 +    public ComponentOperator open() {
   22.96 +        log("::open");
   22.97 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
   22.98 +        pNode.performPopupAction("Generate Model Report");
   22.99 +        OutputOperator oot = new OutputOperator();
  22.100 +        oot.getTimeouts().setTimeout("ComponentOperator.WaitStateTimeout", 300000);
  22.101 +        OutputTabOperator asot = oot.getOutputTab("UML Report Log");
  22.102 +        asot.getTimeouts().setTimeout("ComponentOperator.WaitStateTimeout", 300000);
  22.103 +        asot.waitText("Report Successful");
  22.104 +        return null;
  22.105 +    }
  22.106 +
  22.107 +    protected void shutdown() {
  22.108 +        log("::shutdown");
  22.109 +        ProjectSupport.closeProject(testProjectName);
  22.110 +    }
  22.111 +
  22.112 +    public void close() {
  22.113 +        log("::close");
  22.114 +        new CloseAllDocumentsAction().performAPI();
  22.115 +    }
  22.116 +
  22.117 +//    public static void main(java.lang.String[] args) {
  22.118 +//        junit.textui.TestRunner.run(new GenerateModelReport("measureTime"));
  22.119 +//    }
  22.120 +}
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/OpenUMLDiagram.java	Tue Jun 28 16:36:36 2011 -0400
    23.3 @@ -0,0 +1,118 @@
    23.4 +/*
    23.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    23.6 + *
    23.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    23.8 + *
    23.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   23.10 + * Other names may be trademarks of their respective owners.
   23.11 + *
   23.12 + * The contents of this file are subject to the terms of either the GNU
   23.13 + * General Public License Version 2 only ("GPL") or the Common
   23.14 + * Development and Distribution License("CDDL") (collectively, the
   23.15 + * "License"). You may not use this file except in compliance with the
   23.16 + * License. You can obtain a copy of the License at
   23.17 + * http://www.netbeans.org/cddl-gplv2.html
   23.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   23.19 + * specific language governing permissions and limitations under the
   23.20 + * License.  When distributing the software, include this License Header
   23.21 + * Notice in each file and include the License file at
   23.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   23.23 + * particular file as subject to the "Classpath" exception as provided
   23.24 + * by Oracle in the GPL Version 2 section of the License file that
   23.25 + * accompanied this code. If applicable, add the following below the
   23.26 + * License Header, with the fields enclosed by brackets [] replaced by
   23.27 + * your own identifying information:
   23.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   23.29 + *
   23.30 + * Contributor(s):
   23.31 + *
   23.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   23.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   23.34 + * Microsystems, Inc. All Rights Reserved.
   23.35 + *
   23.36 + * If you wish your version of this file to be governed by only the CDDL
   23.37 + * or only the GPL Version 2, indicate your decision by adding
   23.38 + * "[Contributor] elects to include this software in this distribution
   23.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   23.40 + * single choice of license, a recipient has the option to distribute
   23.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   23.42 + * to extend the choice of license to its licensees as provided above.
   23.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   23.44 + * Version 2 license, then the option applies only if the new code is
   23.45 + * made subject to such option by the copyright holder.
   23.46 + */
   23.47 +package org.netbeans.performance.uml.actions;
   23.48 +
   23.49 +
   23.50 +import org.netbeans.jellytools.ProjectsTabOperator;
   23.51 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   23.52 +import org.netbeans.jellytools.nodes.Node;
   23.53 +import org.netbeans.jellytools.TopComponentOperator;
   23.54 +
   23.55 +import org.netbeans.jemmy.operators.ComponentOperator;
   23.56 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   23.57 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   23.58 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   23.59 +
   23.60 +
   23.61 +/**
   23.62 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   23.63 + *
   23.64 + * @author rashid@netbeans.org
   23.65 + *
   23.66 + */
   23.67 +public class OpenUMLDiagram extends PerformanceTestCase {
   23.68 +
   23.69 +    private static String testProjectName = "jEdit-Model";
   23.70 +    private static String testDiagramName = "ClassDiagram";
   23.71 +
   23.72 +    /** Creates a new instance of OpenUMLDiagram */
   23.73 +    public OpenUMLDiagram(String testName) {
   23.74 +        super(testName);
   23.75 +        expectedTime = 2000;
   23.76 +        WAIT_AFTER_OPEN = 4000;
   23.77 +    }
   23.78 +
   23.79 +    public OpenUMLDiagram(String testName, String performanceDataName) {
   23.80 +        super(testName, performanceDataName);
   23.81 +        expectedTime = 2000;
   23.82 +        WAIT_AFTER_OPEN = 4000;
   23.83 +    }
   23.84 +
   23.85 +    @Override
   23.86 +    public void initialize() {
   23.87 +        log(":: initialize");
   23.88 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   23.89 +    }
   23.90 +
   23.91 +    public void prepare() {
   23.92 +        log(":: prepare");
   23.93 +    }
   23.94 +
   23.95 +    public ComponentOperator open() {
   23.96 +        log("::open");
   23.97 +
   23.98 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
   23.99 +        Node diag = new Node(pNode, "Diagrams" + "|" + testDiagramName);
  23.100 +        diag.select();
  23.101 +        diag.performPopupAction("Open");
  23.102 +
  23.103 +        return new TopComponentOperator(testDiagramName);
  23.104 +    }
  23.105 +
  23.106 +    @Override
  23.107 +    protected void shutdown() {
  23.108 +        log("::shutdown");
  23.109 +        ProjectSupport.closeProject(testProjectName);
  23.110 +    }
  23.111 +
  23.112 +    @Override
  23.113 +    public void close() {
  23.114 +        log("::close");
  23.115 +        new CloseAllDocumentsAction().performAPI();
  23.116 +    }
  23.117 +
  23.118 +//    public static void main(java.lang.String[] args) {
  23.119 +//        junit.textui.TestRunner.run(new OpenUMLDiagram("measureTime"));
  23.120 +//    }
  23.121 +}
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/OpenUMLProject.java	Tue Jun 28 16:36:36 2011 -0400
    24.3 @@ -0,0 +1,125 @@
    24.4 +/*
    24.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    24.6 + *
    24.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    24.8 + *
    24.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   24.10 + * Other names may be trademarks of their respective owners.
   24.11 + *
   24.12 + * The contents of this file are subject to the terms of either the GNU
   24.13 + * General Public License Version 2 only ("GPL") or the Common
   24.14 + * Development and Distribution License("CDDL") (collectively, the
   24.15 + * "License"). You may not use this file except in compliance with the
   24.16 + * License. You can obtain a copy of the License at
   24.17 + * http://www.netbeans.org/cddl-gplv2.html
   24.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   24.19 + * specific language governing permissions and limitations under the
   24.20 + * License.  When distributing the software, include this License Header
   24.21 + * Notice in each file and include the License file at
   24.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   24.23 + * particular file as subject to the "Classpath" exception as provided
   24.24 + * by Oracle in the GPL Version 2 section of the License file that
   24.25 + * accompanied this code. If applicable, add the following below the
   24.26 + * License Header, with the fields enclosed by brackets [] replaced by
   24.27 + * your own identifying information:
   24.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   24.29 + *
   24.30 + * Contributor(s):
   24.31 + *
   24.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   24.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   24.34 + * Microsystems, Inc. All Rights Reserved.
   24.35 + *
   24.36 + * If you wish your version of this file to be governed by only the CDDL
   24.37 + * or only the GPL Version 2, indicate your decision by adding
   24.38 + * "[Contributor] elects to include this software in this distribution
   24.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   24.40 + * single choice of license, a recipient has the option to distribute
   24.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   24.42 + * to extend the choice of license to its licensees as provided above.
   24.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   24.44 + * Version 2 license, then the option applies only if the new code is
   24.45 + * made subject to such option by the copyright holder.
   24.46 + */
   24.47 +package org.netbeans.performance.uml.actions;
   24.48 +
   24.49 +import org.netbeans.performance.uml.UMLUtilities;
   24.50 +import org.netbeans.jellytools.actions.ActionNoBlock;
   24.51 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   24.52 +import org.netbeans.jellytools.WizardOperator;
   24.53 +
   24.54 +import org.netbeans.jemmy.EventTool;
   24.55 +import org.netbeans.jemmy.operators.JButtonOperator;
   24.56 +import org.netbeans.jemmy.operators.JTextComponentOperator;
   24.57 +import org.netbeans.jemmy.operators.ComponentOperator;
   24.58 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   24.59 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   24.60 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   24.61 +
   24.62 +
   24.63 +
   24.64 +/**
   24.65 + * Test Open UML Project
   24.66 + *
   24.67 + * @author  rashid@netbeans.org
   24.68 + */
   24.69 +public class OpenUMLProject extends PerformanceTestCase {
   24.70 +
   24.71 +    private static String projectName = "jEdit-Model-open";
   24.72 +    private JButtonOperator openButton;
   24.73 +
   24.74 +    /**
   24.75 +     * Creates a new instance of OpenUMLProject
   24.76 +     * @param testName the name of the test
   24.77 +     */
   24.78 +    public OpenUMLProject(String testName) {
   24.79 +        super(testName);
   24.80 +        expectedTime = 10000;
   24.81 +        WAIT_AFTER_OPEN = 4000;
   24.82 +    }
   24.83 +
   24.84 +    /**
   24.85 +     * Creates a new instance of OpenUMLProject
   24.86 +     * @param testName the name of the test
   24.87 +     * @param performanceDataName measured values will be saved under this name
   24.88 +     */
   24.89 +    public OpenUMLProject(String testName, String performanceDataName) {
   24.90 +        super(testName, performanceDataName);
   24.91 +        expectedTime = 10000;
   24.92 +        WAIT_AFTER_OPEN = 4000;
   24.93 +    }
   24.94 +
   24.95 +    @Override
   24.96 +    public void initialize() {
   24.97 +    }
   24.98 +
   24.99 +    public void prepare() {
  24.100 +        new ActionNoBlock("File|Open Project...", null).perform(); //NOI18N
  24.101 +
  24.102 +        WizardOperator opd = new WizardOperator("Open Project"); //NOI18N
  24.103 +
  24.104 +        JTextComponentOperator path = new JTextComponentOperator(opd, 1);
  24.105 +        openButton = new JButtonOperator(opd, "Open Project"); //NOI18N
  24.106 +
  24.107 +        String paths = CommonUtilities.getProjectsDir() + projectName;
  24.108 +        path.setText(paths);
  24.109 +    }
  24.110 +
  24.111 +    public ComponentOperator open() {
  24.112 +        openButton.pushNoBlock();
  24.113 +        UMLUtilities.waitScanFinished();
  24.114 +        UMLUtilities.waitForPendingBackgroundTasks();
  24.115 +        return null;
  24.116 +    }
  24.117 +
  24.118 +    @Override
  24.119 +    public void close() {
  24.120 +        ProjectSupport.closeProject(projectName);
  24.121 +        new EventTool().waitNoEvent(2000);
  24.122 +
  24.123 +    }
  24.124 +
  24.125 +//    public static void main(java.lang.String[] args) {
  24.126 +//        junit.textui.TestRunner.run(new OpenUMLProject("measureTime"));
  24.127 +//    }
  24.128 +}
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/ReverseEngineering.java	Tue Jun 28 16:36:36 2011 -0400
    25.3 @@ -0,0 +1,135 @@
    25.4 +/*
    25.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    25.6 + *
    25.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    25.8 + *
    25.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   25.10 + * Other names may be trademarks of their respective owners.
   25.11 + *
   25.12 + * The contents of this file are subject to the terms of either the GNU
   25.13 + * General Public License Version 2 only ("GPL") or the Common
   25.14 + * Development and Distribution License("CDDL") (collectively, the
   25.15 + * "License"). You may not use this file except in compliance with the
   25.16 + * License. You can obtain a copy of the License at
   25.17 + * http://www.netbeans.org/cddl-gplv2.html
   25.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   25.19 + * specific language governing permissions and limitations under the
   25.20 + * License.  When distributing the software, include this License Header
   25.21 + * Notice in each file and include the License file at
   25.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   25.23 + * particular file as subject to the "Classpath" exception as provided
   25.24 + * by Oracle in the GPL Version 2 section of the License file that
   25.25 + * accompanied this code. If applicable, add the following below the
   25.26 + * License Header, with the fields enclosed by brackets [] replaced by
   25.27 + * your own identifying information:
   25.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   25.29 + *
   25.30 + * Contributor(s):
   25.31 + *
   25.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   25.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   25.34 + * Microsystems, Inc. All Rights Reserved.
   25.35 + *
   25.36 + * If you wish your version of this file to be governed by only the CDDL
   25.37 + * or only the GPL Version 2, indicate your decision by adding
   25.38 + * "[Contributor] elects to include this software in this distribution
   25.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   25.40 + * single choice of license, a recipient has the option to distribute
   25.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   25.42 + * to extend the choice of license to its licensees as provided above.
   25.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   25.44 + * Version 2 license, then the option applies only if the new code is
   25.45 + * made subject to such option by the copyright holder.
   25.46 + */
   25.47 +package org.netbeans.performance.uml.actions;
   25.48 +
   25.49 +
   25.50 +import org.netbeans.jellytools.ProjectsTabOperator;
   25.51 +import org.netbeans.jellytools.nodes.Node;
   25.52 +import org.netbeans.jellytools.NbDialogOperator;
   25.53 +import org.netbeans.jellytools.OutputOperator;
   25.54 +import org.netbeans.jellytools.OutputTabOperator;
   25.55 +
   25.56 +
   25.57 +
   25.58 +import org.netbeans.jemmy.EventTool;
   25.59 +import org.netbeans.jemmy.operators.ComponentOperator;
   25.60 +import org.netbeans.jemmy.operators.JTextFieldOperator;
   25.61 +import org.netbeans.jemmy.operators.JRadioButtonOperator;
   25.62 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   25.63 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   25.64 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   25.65 +
   25.66 +/**
   25.67 + * Test Reverse Engineering 
   25.68 + *
   25.69 + * @author  rashid@netbeans.org
   25.70 + */
   25.71 +public class ReverseEngineering extends PerformanceTestCase {
   25.72 +
   25.73 +    private static String testProjectName = "jEdit";
   25.74 +    private static long suffix;
   25.75 +
   25.76 +    /**
   25.77 +     * Creates a new instance of ReverseEngineering
   25.78 +     * @param testName the name of the test
   25.79 +     */
   25.80 +    public ReverseEngineering(String testName) {
   25.81 +        super(testName);
   25.82 +        expectedTime = 300000;
   25.83 +        WAIT_AFTER_OPEN = 4000;
   25.84 +    }
   25.85 +
   25.86 +    /**
   25.87 +     * Creates a new instance of ReverseEngineering
   25.88 +     * @param testName the name of the test
   25.89 +     * @param performanceDataName measured values will be saved under this name
   25.90 +     */
   25.91 +    public ReverseEngineering(String testName, String performanceDataName) {
   25.92 +        super(testName, performanceDataName);
   25.93 +        expectedTime = 300000;
   25.94 +        WAIT_AFTER_OPEN = 4000;
   25.95 +    }
   25.96 +
   25.97 +    @Override
   25.98 +    public void initialize() {
   25.99 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
  25.100 +        System.gc();
  25.101 +        new EventTool().waitNoEvent(3000);
  25.102 +    }
  25.103 +
  25.104 +    public void prepare() {
  25.105 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
  25.106 +        pNode.select();
  25.107 +        pNode.performPopupAction("Reverse Engineer...");
  25.108 +
  25.109 +        new EventTool().waitNoEvent(1000);
  25.110 +        NbDialogOperator reng = new NbDialogOperator("Reverse Engineer");
  25.111 +        JRadioButtonOperator newUMLradio = new JRadioButtonOperator(reng, "Create New UML Project");
  25.112 +        newUMLradio.push();
  25.113 +        new EventTool().waitNoEvent(1000);
  25.114 +        suffix = System.currentTimeMillis();
  25.115 +        JTextFieldOperator textProject = new JTextFieldOperator(reng, 2);
  25.116 +        textProject.clearText();
  25.117 +        textProject.typeText("jEdit-Model_" + suffix);
  25.118 +        reng.ok();
  25.119 +    }
  25.120 +
  25.121 +    public ComponentOperator open() {
  25.122 +        OutputTabOperator asot = new OutputOperator().getOutputTab("Reverse Engineering");
  25.123 +        asot.getTimeouts().setTimeout("ComponentOperator.WaitStateTimeout", 500000);
  25.124 +        asot.waitText("Task Successful");
  25.125 +        return null;
  25.126 +    }
  25.127 +
  25.128 +    @Override
  25.129 +    public void close() {
  25.130 +        ProjectSupport.closeProject("jEdit-Model_" + suffix);
  25.131 +        runGC(1);
  25.132 +
  25.133 +    }
  25.134 +
  25.135 +//    public static void main(java.lang.String[] args) {
  25.136 +//        junit.textui.TestRunner.run(new ReverseEngineering("measureTime"));
  25.137 +//    }
  25.138 +}
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/ScrollExpandedProject.java	Tue Jun 28 16:36:36 2011 -0400
    26.3 @@ -0,0 +1,124 @@
    26.4 +/*
    26.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    26.6 + *
    26.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    26.8 + *
    26.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   26.10 + * Other names may be trademarks of their respective owners.
   26.11 + *
   26.12 + * The contents of this file are subject to the terms of either the GNU
   26.13 + * General Public License Version 2 only ("GPL") or the Common
   26.14 + * Development and Distribution License("CDDL") (collectively, the
   26.15 + * "License"). You may not use this file except in compliance with the
   26.16 + * License. You can obtain a copy of the License at
   26.17 + * http://www.netbeans.org/cddl-gplv2.html
   26.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   26.19 + * specific language governing permissions and limitations under the
   26.20 + * License.  When distributing the software, include this License Header
   26.21 + * Notice in each file and include the License file at
   26.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   26.23 + * particular file as subject to the "Classpath" exception as provided
   26.24 + * by Oracle in the GPL Version 2 section of the License file that
   26.25 + * accompanied this code. If applicable, add the following below the
   26.26 + * License Header, with the fields enclosed by brackets [] replaced by
   26.27 + * your own identifying information:
   26.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   26.29 + *
   26.30 + * Contributor(s):
   26.31 + *
   26.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   26.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   26.34 + * Microsystems, Inc. All Rights Reserved.
   26.35 + *
   26.36 + * If you wish your version of this file to be governed by only the CDDL
   26.37 + * or only the GPL Version 2, indicate your decision by adding
   26.38 + * "[Contributor] elects to include this software in this distribution
   26.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   26.40 + * single choice of license, a recipient has the option to distribute
   26.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   26.42 + * to extend the choice of license to its licensees as provided above.
   26.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   26.44 + * Version 2 license, then the option applies only if the new code is
   26.45 + * made subject to such option by the copyright holder.
   26.46 + */
   26.47 +package org.netbeans.performance.uml.actions;
   26.48 +
   26.49 +import org.netbeans.jellytools.ProjectsTabOperator;
   26.50 +import org.netbeans.jellytools.nodes.Node;
   26.51 +import org.netbeans.jemmy.EventTool;
   26.52 +import org.netbeans.jemmy.operators.ComponentOperator;
   26.53 +
   26.54 +import org.netbeans.jemmy.operators.JScrollBarOperator;
   26.55 +import org.netbeans.modules.performance.guitracker.ActionTracker;
   26.56 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   26.57 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   26.58 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   26.59 +
   26.60 +/**
   26.61 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   26.62 + *
   26.63 + * @author rashid@netbeans.org
   26.64 + *
   26.65 + */
   26.66 +public class ScrollExpandedProject extends PerformanceTestCase {
   26.67 +
   26.68 +    private static String testProjectName = "jEdit-Model";
   26.69 +    private JScrollBarOperator projectScroll;
   26.70 +    private ProjectsTabOperator pto;
   26.71 +
   26.72 +    /** Creates a new instance of ScrollExpandedProject*/
   26.73 +    public ScrollExpandedProject(String testName) {
   26.74 +        super(testName);
   26.75 +        expectedTime = 2000;
   26.76 +        WAIT_AFTER_OPEN = 4000;
   26.77 +    }
   26.78 +
   26.79 +    public ScrollExpandedProject(String testName, String performanceDataName) {
   26.80 +        super(testName, performanceDataName);
   26.81 +        expectedTime = 2000;
   26.82 +        WAIT_AFTER_OPEN = 4000;
   26.83 +    }
   26.84 +
   26.85 +    @Override
   26.86 +    public void initialize() {
   26.87 +        log(":: initialize");
   26.88 +
   26.89 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   26.90 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
   26.91 +        Node nodeModel = new Node(pNode, "Model");
   26.92 +        Node nodeDiagrams = new Node(pNode, "Diagrams");
   26.93 +        nodeModel.expand();
   26.94 +        nodeDiagrams.select();
   26.95 +        nodeDiagrams.expand();
   26.96 +        new EventTool().waitNoEvent(1000);
   26.97 +        pto = new ProjectsTabOperator();
   26.98 +        projectScroll = new JScrollBarOperator(pto, 0);
   26.99 +        MY_START_EVENT = ActionTracker.TRACK_OPEN_BEFORE_TRACE_MESSAGE;
  26.100 +    }
  26.101 +
  26.102 +    public void prepare() {
  26.103 +        log(":: prepare");
  26.104 +        projectScroll.scrollToMinimum();
  26.105 +    }
  26.106 +
  26.107 +    public ComponentOperator open() {
  26.108 +        log("::open");
  26.109 +        projectScroll.scrollToMaximum();
  26.110 +        return null;
  26.111 +    }
  26.112 +
  26.113 +    @Override
  26.114 +    protected void shutdown() {
  26.115 +        log("::shutdown");
  26.116 +        ProjectSupport.closeProject(testProjectName);
  26.117 +    }
  26.118 +
  26.119 +    @Override
  26.120 +    public void close() {
  26.121 +        log("::close");
  26.122 +    }
  26.123 +
  26.124 +//    public static void main(java.lang.String[] args) {
  26.125 +//        junit.textui.TestRunner.run(new ScrollExpandedProject("measureTime"));
  26.126 +//    }
  26.127 +}
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/actions/SelectingMultipleNodes.java	Tue Jun 28 16:36:36 2011 -0400
    27.3 @@ -0,0 +1,135 @@
    27.4 +/*
    27.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    27.6 + *
    27.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    27.8 + *
    27.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   27.10 + * Other names may be trademarks of their respective owners.
   27.11 + *
   27.12 + * The contents of this file are subject to the terms of either the GNU
   27.13 + * General Public License Version 2 only ("GPL") or the Common
   27.14 + * Development and Distribution License("CDDL") (collectively, the
   27.15 + * "License"). You may not use this file except in compliance with the
   27.16 + * License. You can obtain a copy of the License at
   27.17 + * http://www.netbeans.org/cddl-gplv2.html
   27.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   27.19 + * specific language governing permissions and limitations under the
   27.20 + * License.  When distributing the software, include this License Header
   27.21 + * Notice in each file and include the License file at
   27.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   27.23 + * particular file as subject to the "Classpath" exception as provided
   27.24 + * by Oracle in the GPL Version 2 section of the License file that
   27.25 + * accompanied this code. If applicable, add the following below the
   27.26 + * License Header, with the fields enclosed by brackets [] replaced by
   27.27 + * your own identifying information:
   27.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   27.29 + *
   27.30 + * Contributor(s):
   27.31 + *
   27.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   27.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   27.34 + * Microsystems, Inc. All Rights Reserved.
   27.35 + *
   27.36 + * If you wish your version of this file to be governed by only the CDDL
   27.37 + * or only the GPL Version 2, indicate your decision by adding
   27.38 + * "[Contributor] elects to include this software in this distribution
   27.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   27.40 + * single choice of license, a recipient has the option to distribute
   27.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   27.42 + * to extend the choice of license to its licensees as provided above.
   27.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   27.44 + * Version 2 license, then the option applies only if the new code is
   27.45 + * made subject to such option by the copyright holder.
   27.46 + */
   27.47 +package org.netbeans.performance.uml.actions;
   27.48 +
   27.49 +import java.awt.event.InputEvent;
   27.50 +
   27.51 +import javax.swing.tree.TreePath;
   27.52 +import org.netbeans.jellytools.ProjectsTabOperator;
   27.53 +import org.netbeans.jellytools.nodes.Node;
   27.54 +
   27.55 +import org.netbeans.jemmy.EventTool;
   27.56 +import org.netbeans.jemmy.operators.ComponentOperator;
   27.57 +import org.netbeans.jemmy.operators.JTreeOperator;
   27.58 +
   27.59 +
   27.60 +import org.netbeans.modules.performance.guitracker.ActionTracker;
   27.61 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   27.62 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   27.63 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   27.64 +
   27.65 +/**
   27.66 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   27.67 + *
   27.68 + * @author rashid@netbeans.org
   27.69 + *
   27.70 + */
   27.71 +public class SelectingMultipleNodes extends PerformanceTestCase {
   27.72 +
   27.73 +    private static String testProjectName = "jEdit-Model";
   27.74 +    private TreePath path1,  path2;
   27.75 +    private Node pNode;
   27.76 +
   27.77 +    /** Creates a new instance of SelectingMultipleNodes */
   27.78 +    public SelectingMultipleNodes(String testName) {
   27.79 +        super(testName);
   27.80 +        expectedTime = 2000;
   27.81 +        WAIT_AFTER_OPEN = 4000;
   27.82 +        HEURISTIC_FACTOR = -1;
   27.83 +    }
   27.84 +
   27.85 +    public SelectingMultipleNodes(String testName, String performanceDataName) {
   27.86 +        super(testName, performanceDataName);
   27.87 +        expectedTime = 2000;
   27.88 +        WAIT_AFTER_OPEN = 4000;
   27.89 +        HEURISTIC_FACTOR = -1;
   27.90 +    }
   27.91 +
   27.92 +    @Override
   27.93 +    public void initialize() {
   27.94 +        log(":: initialize");
   27.95 +
   27.96 +        track_mouse_event = ActionTracker.TRACK_MOUSE_PRESS;
   27.97 +
   27.98 +        ProjectSupport.openProject(CommonUtilities.getProjectsDir() + testProjectName);
   27.99 +    }
  27.100 +
  27.101 +    public void prepare() {
  27.102 +        log(":: prepare");
  27.103 +        pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
  27.104 +        Node diag1 = new Node(pNode, "Model|ClassDiagram");
  27.105 +        Node diag2 = new Node(pNode, "Imported Elements");
  27.106 +
  27.107 +        path1 = diag1.getTreePath();
  27.108 +        path2 = diag2.getTreePath();
  27.109 +
  27.110 +        new EventTool().waitNoEvent(1000);
  27.111 +    }
  27.112 +
  27.113 +    public ComponentOperator open() {
  27.114 +        log("::open");
  27.115 +
  27.116 +        JTreeOperator projectTree = new ProjectsTabOperator().tree();
  27.117 +        projectTree.clickOnPath(path1, 1, InputEvent.BUTTON1_MASK);
  27.118 +        new EventTool().waitNoEvent(500);
  27.119 +        projectTree.clickOnPath(path2, 1, InputEvent.BUTTON1_MASK, InputEvent.SHIFT_MASK);
  27.120 +        return null;
  27.121 +    }
  27.122 +
  27.123 +    @Override
  27.124 +    protected void shutdown() {
  27.125 +        log("::shutdown");
  27.126 +        ProjectSupport.closeProject(testProjectName);
  27.127 +    }
  27.128 +
  27.129 +    @Override
  27.130 +    public void close() {
  27.131 +        log("::close");
  27.132 +        pNode.select();
  27.133 +    }
  27.134 +
  27.135 +//    public static void main(java.lang.String[] args) {
  27.136 +//        junit.textui.TestRunner.run(new SelectingMultipleNodes("measureTime"));
  27.137 +//    }
  27.138 +}
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/footprint/UMLFootprintUtilities.java	Tue Jun 28 16:36:36 2011 -0400
    28.3 @@ -0,0 +1,121 @@
    28.4 +/*
    28.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    28.6 + *
    28.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    28.8 + *
    28.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   28.10 + * Other names may be trademarks of their respective owners.
   28.11 + *
   28.12 + * The contents of this file are subject to the terms of either the GNU
   28.13 + * General Public License Version 2 only ("GPL") or the Common
   28.14 + * Development and Distribution License("CDDL") (collectively, the
   28.15 + * "License"). You may not use this file except in compliance with the
   28.16 + * License. You can obtain a copy of the License at
   28.17 + * http://www.netbeans.org/cddl-gplv2.html
   28.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   28.19 + * specific language governing permissions and limitations under the
   28.20 + * License.  When distributing the software, include this License Header
   28.21 + * Notice in each file and include the License file at
   28.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   28.23 + * particular file as subject to the "Classpath" exception as provided
   28.24 + * by Oracle in the GPL Version 2 section of the License file that
   28.25 + * accompanied this code. If applicable, add the following below the
   28.26 + * License Header, with the fields enclosed by brackets [] replaced by
   28.27 + * your own identifying information:
   28.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   28.29 + *
   28.30 + * Contributor(s):
   28.31 + *
   28.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   28.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   28.34 + * Microsystems, Inc. All Rights Reserved.
   28.35 + *
   28.36 + * If you wish your version of this file to be governed by only the CDDL
   28.37 + * or only the GPL Version 2, indicate your decision by adding
   28.38 + * "[Contributor] elects to include this software in this distribution
   28.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   28.40 + * single choice of license, a recipient has the option to distribute
   28.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   28.42 + * to extend the choice of license to its licensees as provided above.
   28.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   28.44 + * Version 2 license, then the option applies only if the new code is
   28.45 + * made subject to such option by the copyright holder.
   28.46 + */
   28.47 +
   28.48 +package org.netbeans.performance.uml.footprint;
   28.49 +
   28.50 +import org.netbeans.jellytools.NewProjectNameLocationStepOperator;
   28.51 +import org.netbeans.jellytools.NewProjectWizardOperator;
   28.52 +import org.netbeans.jellytools.ProjectsTabOperator;
   28.53 +import org.netbeans.jellytools.RuntimeTabOperator;
   28.54 +import org.netbeans.jellytools.nodes.Node;
   28.55 +
   28.56 +import org.netbeans.jemmy.operators.JCheckBoxOperator;
   28.57 +import org.netbeans.jemmy.operators.JComboBoxOperator;
   28.58 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   28.59 +import org.netbeans.performance.uml.UMLUtilities;
   28.60 +
   28.61 +
   28.62 +/**
   28.63 + * Utilities for Memory footprint tests
   28.64 + *
   28.65 + * @author  anebuzelsky@netbeans.org, mmirilovic@netbeans.org
   28.66 + */
   28.67 +public class UMLFootprintUtilities extends UMLUtilities {
   28.68 +    
   28.69 +    static String creatJ2EEeproject(String category, String project, boolean wait) {
   28.70 +        return createProjectGeneral(category, project, wait, true);
   28.71 +    }
   28.72 +    
   28.73 +    private static String createProjectGeneral(String category, String project, boolean wait, boolean j2eeProject) {
   28.74 +        // select Projects tab
   28.75 +        ProjectsTabOperator.invoke();
   28.76 +        
   28.77 +        // create a project
   28.78 +        NewProjectWizardOperator wizard = NewProjectWizardOperator.invoke();
   28.79 +        wizard.selectCategory(category);
   28.80 +        wizard.selectProject(project);
   28.81 +        wizard.next();
   28.82 +
   28.83 +        NewProjectNameLocationStepOperator wizard_location = new NewProjectNameLocationStepOperator();
   28.84 +        wizard_location.txtProjectLocation().clearText();
   28.85 +        wizard_location.txtProjectLocation().typeText(CommonUtilities.getTempDir());
   28.86 +        String pname = wizard_location.txtProjectName().getText();
   28.87 +
   28.88 +        if(j2eeProject) {
   28.89 +            new JComboBoxOperator(wizard_location,1).selectItem(1);
   28.90 +            new JCheckBoxOperator(wizard_location,"Create Application Client module:").setSelected(true);
   28.91 +        }
   28.92 +        
   28.93 +        // if the project exists, try to generate new name
   28.94 +        for (int i = 0; i < 5 && !wizard.btFinish().isEnabled(); i++) {
   28.95 +            pname = pname+"1";
   28.96 +            wizard_location.txtProjectName().clearText();
   28.97 +            wizard_location.txtProjectName().typeText(pname);
   28.98 +        }
   28.99 +        wizard.finish();
  28.100 +
  28.101 +        // wait 10 seconds
  28.102 +        waitForProjectCreation(30000, wait);
  28.103 +        
  28.104 +        return pname;
  28.105 +    }
  28.106 +    
  28.107 +//    static void killRunOnProject(String project) {
  28.108 +//        killProcessOnProject(project, "run");
  28.109 +//    }
  28.110 +//    
  28.111 +//    static void killDebugOnProject(String project) {
  28.112 +//        killProcessOnProject(project, "debug");
  28.113 +//    }
  28.114 +    
  28.115 +    private static void killProcessOnProject(String project, String process) {
  28.116 +        // prepare Runtime tab
  28.117 +        RuntimeTabOperator runtime = RuntimeTabOperator.invoke();
  28.118 +        
  28.119 +        // kill the execution
  28.120 +        Node node = new Node(runtime.getRootNode(), "Processes|"+project+ " (" + process + ")");
  28.121 +        node.select();
  28.122 +        node.performPopupAction("Terminate Process");
  28.123 +    }
  28.124 +}
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/footprint/UMLWorkflow.java	Tue Jun 28 16:36:36 2011 -0400
    29.3 @@ -0,0 +1,153 @@
    29.4 +/*
    29.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    29.6 + *
    29.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    29.8 + *
    29.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   29.10 + * Other names may be trademarks of their respective owners.
   29.11 + *
   29.12 + * The contents of this file are subject to the terms of either the GNU
   29.13 + * General Public License Version 2 only ("GPL") or the Common
   29.14 + * Development and Distribution License("CDDL") (collectively, the
   29.15 + * "License"). You may not use this file except in compliance with the
   29.16 + * License. You can obtain a copy of the License at
   29.17 + * http://www.netbeans.org/cddl-gplv2.html
   29.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   29.19 + * specific language governing permissions and limitations under the
   29.20 + * License.  When distributing the software, include this License Header
   29.21 + * Notice in each file and include the License file at
   29.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   29.23 + * particular file as subject to the "Classpath" exception as provided
   29.24 + * by Oracle in the GPL Version 2 section of the License file that
   29.25 + * accompanied this code. If applicable, add the following below the
   29.26 + * License Header, with the fields enclosed by brackets [] replaced by
   29.27 + * your own identifying information:
   29.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   29.29 + *
   29.30 + * Contributor(s):
   29.31 + *
   29.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   29.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   29.34 + * Microsystems, Inc. All Rights Reserved.
   29.35 + *
   29.36 + * If you wish your version of this file to be governed by only the CDDL
   29.37 + * or only the GPL Version 2, indicate your decision by adding
   29.38 + * "[Contributor] elects to include this software in this distribution
   29.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   29.40 + * single choice of license, a recipient has the option to distribute
   29.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   29.42 + * to extend the choice of license to its licensees as provided above.
   29.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   29.44 + * Version 2 license, then the option applies only if the new code is
   29.45 + * made subject to such option by the copyright holder.
   29.46 + */
   29.47 +
   29.48 +package org.netbeans.performance.uml.footprint;
   29.49 +
   29.50 +import org.netbeans.jellytools.NbDialogOperator;
   29.51 +import org.netbeans.jellytools.OutputOperator;
   29.52 +import org.netbeans.jellytools.ProjectsTabOperator;
   29.53 +import org.netbeans.jellytools.WizardOperator;
   29.54 +import org.netbeans.jellytools.actions.ActionNoBlock;
   29.55 +import org.netbeans.jellytools.actions.OutputWindowViewAction;
   29.56 +import org.netbeans.jellytools.nodes.Node;
   29.57 +import org.netbeans.jellytools.nodes.ProjectRootNode;
   29.58 +
   29.59 +import org.netbeans.jemmy.operators.ComponentOperator;
   29.60 +import org.netbeans.jemmy.operators.JListOperator;
   29.61 +import org.netbeans.jemmy.operators.JTextFieldOperator;
   29.62 +import org.netbeans.modules.performance.utilities.MemoryFootprintTestCase;
   29.63 +
   29.64 +/**
   29.65 + * Measure UML Project Workflow Memory footprint
   29.66 + *
   29.67 + * @author  mmirilovic@netbeans.org
   29.68 + */
   29.69 +public class UMLWorkflow extends MemoryFootprintTestCase {
   29.70 +    
   29.71 +    private ProjectRootNode j2seproject, j2seprojectmodel;
   29.72 +    
   29.73 +    /**
   29.74 +     * Creates a new instance of J2EEProjectWorkflow
   29.75 +     *
   29.76 +     * @param testName the name of the test
   29.77 +     */
   29.78 +    public UMLWorkflow(String testName) {
   29.79 +        super(testName);
   29.80 +        prefix = "UML Project Workflow |";
   29.81 +    }
   29.82 +    
   29.83 +    /**
   29.84 +     * Creates a new instance of J2EEProjectWorkflow
   29.85 +     *
   29.86 +     * @param testName the name of the test
   29.87 +     * @param performanceDataName measured values will be saved under this name
   29.88 +     */
   29.89 +    public UMLWorkflow(String testName, String performanceDataName) {
   29.90 +        super(testName, performanceDataName);
   29.91 +        prefix = "UML Project Workflow |";
   29.92 +    }
   29.93 +    
   29.94 +    @Override
   29.95 +    public void setUp() {
   29.96 +        //do nothing
   29.97 +    }
   29.98 +    
   29.99 +    public void prepare() {
  29.100 +    }
  29.101 +    
  29.102 +    @Override
  29.103 +    public void initialize() {
  29.104 +        super.initialize();
  29.105 +        UMLFootprintUtilities.closeAllDocuments();
  29.106 +        UMLFootprintUtilities.closeMemoryToolbar();
  29.107 +    }
  29.108 +    
  29.109 +    public ComponentOperator open(){
  29.110 +        // Create, edit, build and execute a sample J2SE project
  29.111 +        String j2seprojectName = UMLFootprintUtilities.createproject("Samples|Java", "Anagram Game", true);
  29.112 +        j2seproject = new ProjectsTabOperator().getProjectRootNode(j2seprojectName);
  29.113 +        
  29.114 +        new OutputWindowViewAction().performAPI();
  29.115 +        UMLFootprintUtilities.buildproject(j2seprojectName);
  29.116 +        
  29.117 +        // reverse enginnering
  29.118 +        new ActionNoBlock(null,"Reverse Engineer...").performPopup(j2seproject); //NOI18N
  29.119 +        new NbDialogOperator("Reverse Engineer").ok(); //NOI18N
  29.120 +        
  29.121 +        new OutputOperator().getOutputTab("Reverse Engineering Log").waitText("Task Successful"); //NOI18N
  29.122 +        j2seprojectmodel = new ProjectsTabOperator().getProjectRootNode(j2seprojectName+"-Model");
  29.123 +        j2seprojectmodel.expand();
  29.124 +        
  29.125 +        Node modelNode = new Node(j2seprojectmodel, "Model");
  29.126 +        modelNode.expand();
  29.127 +        
  29.128 +        String modelNodeNames[] = modelNode.getChildren();
  29.129 +        Node modelNodes[] = new Node[modelNodeNames.length];
  29.130 +        
  29.131 +        for (int i = 0; i < modelNodeNames.length; i++) {
  29.132 +            modelNodes[i] = new Node(modelNode, modelNodeNames[i]);
  29.133 +        }
  29.134 +        
  29.135 +        new ActionNoBlock(null,"Create Diagram From Selected Elements...").performPopup(modelNodes); //NOI18N
  29.136 +        WizardOperator createNewDiagram = new WizardOperator("Create New Diagram"); //NOI18N
  29.137 +        new JListOperator(createNewDiagram, "Activity Diagram").selectItem("Class Diagram"); //NOI18N
  29.138 +        JTextFieldOperator textfield = new JTextFieldOperator(createNewDiagram);
  29.139 +        textfield.clearText();
  29.140 +        textfield.typeText("ClassDiagram");
  29.141 +        createNewDiagram.finish();
  29.142 +        
  29.143 +        return null;
  29.144 +    }
  29.145 +    
  29.146 +    @Override
  29.147 +    public void close(){
  29.148 +//        UMLFootprintUtilities.deleteProject(j2seprojectmodel.getText());
  29.149 +//        UMLFootprintUtilities.deleteProject(j2seproject.getText());
  29.150 +    }
  29.151 +    
  29.152 +//    public static void main(java.lang.String[] args) {
  29.153 +//        junit.textui.TestRunner.run(new UMLWorkflow("measureMemoryFooprint"));
  29.154 +//    }
  29.155 +    
  29.156 +}
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/menus/MultipleNodeContextMenu.java	Tue Jun 28 16:36:36 2011 -0400
    30.3 @@ -0,0 +1,137 @@
    30.4 +/*
    30.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    30.6 + *
    30.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    30.8 + *
    30.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   30.10 + * Other names may be trademarks of their respective owners.
   30.11 + *
   30.12 + * The contents of this file are subject to the terms of either the GNU
   30.13 + * General Public License Version 2 only ("GPL") or the Common
   30.14 + * Development and Distribution License("CDDL") (collectively, the
   30.15 + * "License"). You may not use this file except in compliance with the
   30.16 + * License. You can obtain a copy of the License at
   30.17 + * http://www.netbeans.org/cddl-gplv2.html
   30.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   30.19 + * specific language governing permissions and limitations under the
   30.20 + * License.  When distributing the software, include this License Header
   30.21 + * Notice in each file and include the License file at
   30.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   30.23 + * particular file as subject to the "Classpath" exception as provided
   30.24 + * by Oracle in the GPL Version 2 section of the License file that
   30.25 + * accompanied this code. If applicable, add the following below the
   30.26 + * License Header, with the fields enclosed by brackets [] replaced by
   30.27 + * your own identifying information:
   30.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   30.29 + *
   30.30 + * Contributor(s):
   30.31 + *
   30.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   30.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   30.34 + * Microsystems, Inc. All Rights Reserved.
   30.35 + *
   30.36 + * If you wish your version of this file to be governed by only the CDDL
   30.37 + * or only the GPL Version 2, indicate your decision by adding
   30.38 + * "[Contributor] elects to include this software in this distribution
   30.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   30.40 + * single choice of license, a recipient has the option to distribute
   30.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   30.42 + * to extend the choice of license to its licensees as provided above.
   30.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   30.44 + * Version 2 license, then the option applies only if the new code is
   30.45 + * made subject to such option by the copyright holder.
   30.46 + */
   30.47 +
   30.48 +
   30.49 +package org.netbeans.performance.uml.menus;
   30.50 +
   30.51 +import org.netbeans.jellytools.ProjectsTabOperator;
   30.52 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   30.53 +import org.netbeans.jellytools.nodes.Node;
   30.54 +import org.netbeans.jemmy.EventTool;
   30.55 +import org.netbeans.jemmy.operators.ComponentOperator;
   30.56 +import org.netbeans.jemmy.operators.JTreeOperator;
   30.57 +
   30.58 +import javax.swing.tree.TreePath;
   30.59 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   30.60 +import org.netbeans.modules.performance.utilities.PerformanceTestCase;
   30.61 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   30.62 +import org.netbeans.performance.uml.UMLUtilities;
   30.63 +
   30.64 +/**
   30.65 + * Measure UI-RESPONSIVENES and WINDOW_OPENING.
   30.66 + *
   30.67 + * @author rashid@netbeans.org
   30.68 + *
   30.69 + */
   30.70 +public class MultipleNodeContextMenu extends PerformanceTestCase {
   30.71 +
   30.72 +    private static String testProjectName = "jEdit-Model";
   30.73 +    private static String testDiagramName = "ClassDiagram";
   30.74 +    private Node diag;
   30.75 +
   30.76 +    /** Creates a new instance of MultipleNodeContextMenu*/
   30.77 +    public MultipleNodeContextMenu(String testName) {
   30.78 +        super(testName);
   30.79 +        //TODO: Adjust expectedTime value
   30.80 +        expectedTime = 2000;
   30.81 +        WAIT_AFTER_OPEN = 4000;
   30.82 +    }
   30.83 +
   30.84 +    public MultipleNodeContextMenu(String testName, String performanceDataName) {
   30.85 +        super(testName, performanceDataName);
   30.86 +        //TODO: Adjust expectedTime value
   30.87 +        expectedTime = 2000;
   30.88 +        WAIT_AFTER_OPEN = 4000;
   30.89 +    }
   30.90 +
   30.91 +    @Override
   30.92 +    public void initialize() {
   30.93 +        log(":: initialize");
   30.94 +
   30.95 +        UMLUtilities.waitProjectOpenedScanFinished(CommonUtilities.getProjectsDir() + testProjectName);
   30.96 +        new CloseAllDocumentsAction().performAPI();
   30.97 +    }
   30.98 +
   30.99 +    public void prepare() {
  30.100 +        log(":: prepare");
  30.101 +        Node pNode = new ProjectsTabOperator().getProjectRootNode(testProjectName);
  30.102 +        diag = new Node(pNode, "Model" + "|" + testDiagramName);
  30.103 +        diag.select();
  30.104 +        new EventTool().waitNoEvent(1000);
  30.105 +    }
  30.106 +
  30.107 +    public ComponentOperator open() {
  30.108 +        log("::open");
  30.109 +
  30.110 +        JTreeOperator projectTree = new ProjectsTabOperator().tree();
  30.111 +        new EventTool().waitNoEvent(1000);
  30.112 +
  30.113 +        TreePath[] arrTreePath;
  30.114 +        arrTreePath = new TreePath[110];
  30.115 +        for (int i = 0; i < arrTreePath.length; i++) {
  30.116 +            arrTreePath[i] = projectTree.getPathForRow(3 + i);
  30.117 +        }
  30.118 +        log("::after array");
  30.119 +        projectTree.callPopupOnPaths(arrTreePath);
  30.120 +
  30.121 +        return null;
  30.122 +    }
  30.123 +
  30.124 +    @Override
  30.125 +    protected void shutdown() {
  30.126 +        log("::shutdown");
  30.127 +        ProjectSupport.closeProject(testProjectName);
  30.128 +        new CloseAllDocumentsAction().performAPI();
  30.129 +    }
  30.130 +
  30.131 +    @Override
  30.132 +    public void close() {
  30.133 +        log("::close");
  30.134 +        new CloseAllDocumentsAction().performAPI();
  30.135 +    }
  30.136 +
  30.137 +//    public static void main(java.lang.String[] args) {
  30.138 +//        junit.textui.TestRunner.run(new MultipleNodeContextMenu("measureTime"));
  30.139 +//    }
  30.140 +}
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/performance/test/qa-functional/src/org/netbeans/performance/uml/setup/UMLSetup.java	Tue Jun 28 16:36:36 2011 -0400
    31.3 @@ -0,0 +1,91 @@
    31.4 +/*
    31.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    31.6 + *
    31.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    31.8 + *
    31.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   31.10 + * Other names may be trademarks of their respective owners.
   31.11 + *
   31.12 + * The contents of this file are subject to the terms of either the GNU
   31.13 + * General Public License Version 2 only ("GPL") or the Common
   31.14 + * Development and Distribution License("CDDL") (collectively, the
   31.15 + * "License"). You may not use this file except in compliance with the
   31.16 + * License. You can obtain a copy of the License at
   31.17 + * http://www.netbeans.org/cddl-gplv2.html
   31.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   31.19 + * specific language governing permissions and limitations under the
   31.20 + * License.  When distributing the software, include this License Header
   31.21 + * Notice in each file and include the License file at
   31.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   31.23 + * particular file as subject to the "Classpath" exception as provided
   31.24 + * by Oracle in the GPL Version 2 section of the License file that
   31.25 + * accompanied this code. If applicable, add the following below the
   31.26 + * License Header, with the fields enclosed by brackets [] replaced by
   31.27 + * your own identifying information:
   31.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   31.29 + *
   31.30 + * Contributor(s):
   31.31 + *
   31.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   31.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   31.34 + * Microsystems, Inc. All Rights Reserved.
   31.35 + *
   31.36 + * If you wish your version of this file to be governed by only the CDDL
   31.37 + * or only the GPL Version 2, indicate your decision by adding
   31.38 + * "[Contributor] elects to include this software in this distribution
   31.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   31.40 + * single choice of license, a recipient has the option to distribute
   31.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   31.42 + * to extend the choice of license to its licensees as provided above.
   31.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   31.44 + * Version 2 license, then the option applies only if the new code is
   31.45 + * made subject to such option by the copyright holder.
   31.46 + */
   31.47 +
   31.48 +
   31.49 +package org.netbeans.performance.uml.setup;
   31.50 +
   31.51 +
   31.52 +import org.netbeans.jellytools.JellyTestCase;
   31.53 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   31.54 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   31.55 +
   31.56 +/**
   31.57 + * Test suite that actually does not perform any test but sets up user directory
   31.58 + * for UI responsiveness tests
   31.59 + *
   31.60 + * @author  mmirilovic@netbeans.org, mrkam@netbeans.org
   31.61 + */
   31.62 +public class UMLSetup extends JellyTestCase {
   31.63 +    
   31.64 +    public UMLSetup(java.lang.String testName) {
   31.65 +        super(testName);
   31.66 +    }
   31.67 +    
   31.68 +    public void openProject(String projectPath) {
   31.69 +        String projectsDir = CommonUtilities.getProjectsDir() + projectPath;
   31.70 +        Object prj = ProjectSupport.openProject(projectsDir);
   31.71 +        assertNotNull(prj);
   31.72 +        CommonUtilities.waitProjectTasksFinished();
   31.73 +    }
   31.74 +
   31.75 +    public void openJEditModelProject() {
   31.76 +        openProject("jEdit-Model");
   31.77 +    }
   31.78 +
   31.79 +    public void openJEditProject() {
   31.80 +        openProject("jEdit41");
   31.81 +    }
   31.82 +    
   31.83 +    public void testCloseTaskWindow() {
   31.84 +        CommonUtilities.closeTaskWindow();
   31.85 +    }      
   31.86 +
   31.87 +    public void closeMemoryToolbar() {
   31.88 +        CommonUtilities.closeMemoryToolbar();
   31.89 +    }
   31.90 +
   31.91 +    public void closeAllDocuments() {
   31.92 +        CommonUtilities.closeAllDocuments();
   31.93 +    }
   31.94 +}
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/performance/test/unit/src/org/netbeans/performance/uml/prepare/PrepareIDEForUMLComplexMeasurementsTest.java	Tue Jun 28 16:36:36 2011 -0400
    32.3 @@ -0,0 +1,233 @@
    32.4 +/*
    32.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    32.6 + *
    32.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    32.8 + *
    32.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   32.10 + * Other names may be trademarks of their respective owners.
   32.11 + *
   32.12 + * The contents of this file are subject to the terms of either the GNU
   32.13 + * General Public License Version 2 only ("GPL") or the Common
   32.14 + * Development and Distribution License("CDDL") (collectively, the
   32.15 + * "License"). You may not use this file except in compliance with the
   32.16 + * License. You can obtain a copy of the License at
   32.17 + * http://www.netbeans.org/cddl-gplv2.html
   32.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   32.19 + * specific language governing permissions and limitations under the
   32.20 + * License.  When distributing the software, include this License Header
   32.21 + * Notice in each file and include the License file at
   32.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   32.23 + * particular file as subject to the "Classpath" exception as provided
   32.24 + * by Oracle in the GPL Version 2 section of the License file that
   32.25 + * accompanied this code. If applicable, add the following below the
   32.26 + * License Header, with the fields enclosed by brackets [] replaced by
   32.27 + * your own identifying information:
   32.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   32.29 + *
   32.30 + * Contributor(s):
   32.31 + *
   32.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   32.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   32.34 + * Microsystems, Inc. All Rights Reserved.
   32.35 + *
   32.36 + * If you wish your version of this file to be governed by only the CDDL
   32.37 + * or only the GPL Version 2, indicate your decision by adding
   32.38 + * "[Contributor] elects to include this software in this distribution
   32.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   32.40 + * single choice of license, a recipient has the option to distribute
   32.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   32.42 + * to extend the choice of license to its licensees as provided above.
   32.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   32.44 + * Version 2 license, then the option applies only if the new code is
   32.45 + * made subject to such option by the copyright holder.
   32.46 + */
   32.47 +
   32.48 +
   32.49 +package org.netbeans.performance.uml.prepare;
   32.50 +
   32.51 +import java.util.ArrayList;
   32.52 +
   32.53 +import org.netbeans.jellytools.Bundle;
   32.54 +import org.netbeans.jellytools.JellyTestCase;
   32.55 +import org.netbeans.jellytools.ProjectsTabOperator;
   32.56 +import org.netbeans.jellytools.TopComponentOperator;
   32.57 +
   32.58 +import org.netbeans.jellytools.actions.Action;
   32.59 +import org.netbeans.jellytools.actions.OpenAction;
   32.60 +import org.netbeans.jellytools.actions.CloseAllDocumentsAction;
   32.61 +import org.netbeans.jellytools.nodes.Node;
   32.62 +import org.netbeans.jellytools.nodes.ProjectRootNode;
   32.63 +
   32.64 +import org.netbeans.jemmy.operators.JCheckBoxOperator;
   32.65 +import org.netbeans.jemmy.operators.Operator;
   32.66 +
   32.67 +import junit.framework.Test;
   32.68 +
   32.69 +import org.netbeans.junit.NbModuleSuite;
   32.70 +import org.netbeans.junit.NbTestSuite;
   32.71 +
   32.72 +import org.netbeans.modules.performance.utilities.CommonUtilities;
   32.73 +import org.netbeans.modules.performance.utilities.MeasureStartupTimeTestCase;
   32.74 +import org.netbeans.modules.project.ui.test.ProjectSupport;
   32.75 +
   32.76 +
   32.77 +/**
   32.78 + * Prepare user directory for complex measurements (startup time and memory consumption) of IDE with opened project and 10 files.
   32.79 + * Open 10 java files and shut down ide.
   32.80 + * Created user directory will be used to measure startup time and memory consumption of IDE with opened files.
   32.81 + *
   32.82 + * @author mrkam@netbeans.org
   32.83 + */
   32.84 +public class PrepareIDEForUMLComplexMeasurementsTest extends JellyTestCase {
   32.85 +    
   32.86 +    /** Error output from the test. */
   32.87 +    protected static java.io.PrintStream err;
   32.88 +    
   32.89 +    /** Logging output from the test. */
   32.90 +    protected static java.io.PrintStream log;
   32.91 +    
   32.92 +    /** If true - at least one test failed */
   32.93 +    protected static boolean test_failed = false;
   32.94 +    
   32.95 +    /** Define testcase
   32.96 +     * @param testName name of the testcase
   32.97 +     */
   32.98 +    public PrepareIDEForUMLComplexMeasurementsTest(String testName) {
   32.99 +        super(testName);
  32.100 +    }
  32.101 +    
  32.102 +    /** Testsuite
  32.103 +     * @return testuite
  32.104 +     */
  32.105 +    public static Test suite() {
  32.106 +        NbTestSuite suite = new NbTestSuite("Prepare IDE for startup suite for UML Pack");
  32.107 +        suite.addTest(NbModuleSuite.create(
  32.108 +            NbModuleSuite.createConfiguration(PrepareIDEForUMLComplexMeasurementsTest.class)
  32.109 +            .addTest("closeAllDocuments")
  32.110 +            .addTest("closeMemoryToolbar")
  32.111 +            .addTest("openProjects")
  32.112 +            .addTest("openFiles")
  32.113 +            .addTest("saveStatus")
  32.114 +            .enableModules(".*")
  32.115 +            .clusters(".*")
  32.116 +        ));
  32.117 +        return suite;
  32.118 +    }
  32.119 +    
  32.120 +    
  32.121 +    @Override
  32.122 +    public void setUp() {
  32.123 +//        err = System.out;
  32.124 +        err = getLog();
  32.125 +        log = getRef();
  32.126 +    }
  32.127 +    
  32.128 +    /**
  32.129 +     * Close All Documents.
  32.130 +     */
  32.131 +    public void closeAllDocuments(){
  32.132 +
  32.133 +	if ( new Action("Window|Close All Documents",null).isEnabled() )
  32.134 +	        try {
  32.135 +        	    new CloseAllDocumentsAction().perform();
  32.136 +	        }catch(Exception exc){
  32.137 +	            test_failed = true;
  32.138 +        	    fail(exc);
  32.139 +	        }
  32.140 +
  32.141 +    }
  32.142 +    
  32.143 +    /**
  32.144 +     * Close Memory Toolbar.
  32.145 +     */
  32.146 +    public static void closeMemoryToolbar(){
  32.147 +        CommonUtilities.closeMemoryToolbar();
  32.148 +    }
  32.149 +
  32.150 +    /**
  32.151 +     * Open Travel Reservation projects
  32.152 +     */
  32.153 +    public void openProjects() {
  32.154 +        try {
  32.155 +            Object prj = ProjectSupport.openProject(CommonUtilities.getProjectsDir() + "jEdit-Model");
  32.156 +            assertNotNull(prj);
  32.157 +            CommonUtilities.waitProjectTasksFinished();
  32.158 +        }catch(Exception exc){
  32.159 +            test_failed = true;
  32.160 +            fail(exc);
  32.161 +        }
  32.162 +    }
  32.163 +    
  32.164 +    /**
  32.165 +     * Open 10 selected files from Travel Reservation projects
  32.166 +     */
  32.167 +    public void openFiles(){
  32.168 +        try {
  32.169 +            String[][] nodes_path = {
  32.170 +                {"jEdit-Model", "Diagrams", "ClassDiagram"},
  32.171 +                {"jEdit-Model", "Diagrams", "ActivityDiagram"},
  32.172 +                {"jEdit-Model", "Diagrams", "SequenceDiagram"},
  32.173 +                {"jEdit-Model", "Diagrams", "StateDiagram"}
  32.174 +            };
  32.175 +            
  32.176 +            ArrayList<Node> openFileNodes = new ArrayList<Node>();
  32.177 +            Node node, fileNode;
  32.178 +            
  32.179 +            // create exactly (full match) and case sensitively comparing comparator
  32.180 +            Operator.DefaultStringComparator comparator = new Operator.DefaultStringComparator(true, true);
  32.181 +            
  32.182 +            for(int i=0; i<nodes_path.length; i++) {
  32.183 +                // try to workarround problems with tooltip on Win2K & WinXP - issue 56825
  32.184 +                ProjectRootNode projectNode = new ProjectsTabOperator().getProjectRootNode(nodes_path[i][0]);
  32.185 +                projectNode.expand();
  32.186 +                
  32.187 +                node = new Node(projectNode,nodes_path[i][1]);
  32.188 +                node.setComparator(comparator);
  32.189 +                node.expand();
  32.190 +                
  32.191 +                fileNode = new Node(node,nodes_path[i][2]);
  32.192 +                //try to avoid issue 56825
  32.193 +                fileNode.select();
  32.194 +                
  32.195 +                openFileNodes.add(fileNode);
  32.196 +                
  32.197 +                // open file one by one, opening all files at once causes never ending loop (java+mdr)
  32.198 +                //new OpenAction().performAPI(openFileNodes[i]);
  32.199 +            }
  32.200 +            
  32.201 +            // try to come back and open all files at-once, rises another problem with refactoring, if you do open file and next expand folder,
  32.202 +            // it doesn't finish in the real-time -> hard to reproduced by hand
  32.203 +            try {
  32.204 +                new OpenAction().performAPI(openFileNodes.toArray(new Node[0]));
  32.205 +            }catch(Exception exc){
  32.206 +                err.println("---------------------------------------");
  32.207 +                err.println("issue 56825 : EXCEPTION catched during OpenAction");
  32.208 +                exc.printStackTrace(err);
  32.209 +                err.println("---------------------------------------");
  32.210 +                err.println("issue 56825 : Try it again");
  32.211 +                new OpenAction().performAPI(openFileNodes.toArray(new Node[0]));
  32.212 +                err.println("issue 56825 : Success");
  32.213 +            }
  32.214 +            
  32.215 +            
  32.216 +            // check whether files are opened in editor
  32.217 +            for(int i=0; i<nodes_path.length; i++) {
  32.218 +                new TopComponentOperator(nodes_path[i][2]);
  32.219 +            }
  32.220 +//        new org.netbeans.jemmy.EventTool().waitNoEvent(60000);
  32.221 +            
  32.222 +        }catch(Exception exc){
  32.223 +            test_failed = true;
  32.224 +            fail(exc);
  32.225 +        }
  32.226 +    }
  32.227 +    
  32.228 +    /**
  32.229 +     * Save status, if one of the above defined test failed, this method creates
  32.230 +     * file in predefined path and it means the complex tests will not run.
  32.231 +     */
  32.232 +    public void saveStatus() throws java.io.IOException{
  32.233 +        if(test_failed)
  32.234 +            MeasureStartupTimeTestCase.createStatusFile();
  32.235 +    }
  32.236 +}
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/performance/test/unit/src/org/netbeans/performance/uml/startup/ComplexUMLDiagramStartupTest.java	Tue Jun 28 16:36:36 2011 -0400
    33.3 @@ -0,0 +1,80 @@
    33.4 +/*
    33.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    33.6 + *
    33.7 + * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
    33.8 + *
    33.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   33.10 + * Other names may be trademarks of their respective owners.
   33.11 + *
   33.12 + * The contents of this file are subject to the terms of either the GNU
   33.13 + * General Public License Version 2 only ("GPL") or the Common
   33.14 + * Development and Distribution License("CDDL") (collectively, the
   33.15 + * "License"). You may not use this file except in compliance with the
   33.16 + * License. You can obtain a copy of the License at
   33.17 + * http://www.netbeans.org/cddl-gplv2.html
   33.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   33.19 + * specific language governing permissions and limitations under the
   33.20 + * License.  When distributing the software, include this License Header
   33.21 + * Notice in each file and include the License file at
   33.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   33.23 + * particular file as subject to the "Classpath" exception as provided
   33.24 + * by Oracle in the GPL Version 2 section of the License file that
   33.25 + * accompanied this code. If applicable, add the following below the
   33.26 + * License Header, with the fields enclosed by brackets [] replaced by
   33.27 + * your own identifying information:
   33.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   33.29 + *
   33.30 + * Contributor(s):
   33.31 + *
   33.32 + * The Original Software is NetBeans. The Initial Developer of the Original
   33.33 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   33.34 + * Microsystems, Inc. All Rights Reserved.
   33.35 + *
   33.36 + * If you wish your version of this file to be governed by only the CDDL
   33.37 + * or only the GPL Version 2, indicate your decision by adding
   33.38 + * "[Contributor] elects to include this software in this distribution
   33.39 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   33.40 + * single choice of license, a recipient has the option to distribute
   33.41 + * your version of this file under either the CDDL, the GPL Version 2 or
   33.42 + * to extend the choice of license to its licensees as provided above.
   33.43 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   33.44 + * Version 2 license, then the option applies only if the new code is
   33.45 + * made subject to such option by the copyright holder.
   33.46 + */
   33.47 +
   33.48 +
   33.49 +package org.netbeans.performance.uml.startup;
   33.50 +
   33.51 +import java.io.IOException;
   33.52 +import org.netbeans.modules.performance.utilities.MeasureStartupTimeTestCase;
   33.53 +
   33.54 +/**
   33.55 + * Measure startup time by org.netbeans.core.perftool.StartLog.
   33.56 + * Number of starts with new userdir is defined by property
   33.57 + * <br> <code> org.netbeans.performance.repeat.with.new.userdir </code>
   33.58 + * <br> and number of starts with old userdir is defined by property
   33.59 + * <br> <code> org.netbeans.performance.repeat </code>
   33.60 + * Run measurement defined number times, but forget first measured value,
   33.61 + * it's a attempt to have still the same testing conditions with
   33.62 + * loaded and cached files.
   33.63 + *
   33.64 + * @author mrkam@netbeans.org
   33.65 + */
   33.66 +public class ComplexUMLDiagramStartupTest extends MeasureStartupTimeTestCase {
   33.67 +    
   33.68 +    /** Define testcase
   33.69 +     * @param testName name of the testcase
   33.70 +     */
   33.71 +    public ComplexUMLDiagramStartupTest(String testName) {
   33.72 +        super(testName);
   33.73 +    }
   33.74 +    
   33.75 +    /** Testing start of IDE with measurement of the startup time.
   33.76 +     * @throws IOException
   33.77 +     */
   33.78 +    public void testStartIDE() throws java.io.IOException {
   33.79 +        measureComplexStartupTime("Startup Time with opened UML diagram");
   33.80 +    }
   33.81 +    
   33.82 +
   33.83 +}