├── .cvsignore
├── .github
├── ISSUE_TEMPLATE.md
└── workflows
│ └── maven.yml
├── .gitignore
├── .mvn
└── wrapper
│ ├── maven-wrapper.jar
│ └── maven-wrapper.properties
├── .project
├── .travis.yml
├── CHANGES.md
├── README.md
├── dependabot.yml
├── docs
├── Troubleshooting.md
├── download.md
├── index.md
└── pics
│ ├── classes.png
│ ├── convert1.png
│ ├── convert2.png
│ ├── failure.png
│ ├── groups.png
│ ├── launch.png
│ ├── m2e-pref.png
│ ├── m2e-prop.png
│ ├── menu-convert2.png
│ ├── menu-convert4.png
│ ├── new-1.png
│ ├── new-2.png
│ ├── outline.png
│ ├── preferences.png
│ ├── project_properties.png
│ ├── refactoring1.png
│ ├── refactoring2.png
│ ├── search.png
│ ├── success.png
│ ├── suites.png
│ ├── summary1.png
│ ├── summary2.png
│ ├── template.png
│ └── view.png
├── mvnw
├── mvnw.cmd
├── new-release
├── pom.xml
├── scripts
├── new-release-old
├── set-version
├── upload-release
└── upload-updatesite
├── target-platform.target
├── testng-eclipse-feature
├── .classpath
├── .gitignore
├── .project
├── build.properties
├── feature.xml
├── p2.inf
└── pom.xml
├── testng-eclipse-plugin
├── .classpath
├── .gitignore
├── .project
├── .settings
│ ├── org.eclipse.jdt.core.prefs
│ └── org.eclipse.jdt.ui.prefs
├── META-INF
│ └── MANIFEST.MF
├── build.properties
├── docs
│ ├── TODO.txt
│ └── TestNG_Launch_Tab.png
├── icons
│ └── full
│ │ ├── dlcl16
│ │ ├── compare.png
│ │ ├── compare@2x.png
│ │ ├── debug.png
│ │ ├── debug@2x.png
│ │ ├── history_list.png
│ │ ├── history_list@2x.png
│ │ ├── relaunch.png
│ │ ├── relaunch@2x.png
│ │ ├── relaunchf.png
│ │ ├── relaunchf@2x.png
│ │ ├── report.png
│ │ ├── report@2x.png
│ │ ├── select_next.png
│ │ ├── select_next@2x.png
│ │ ├── select_prev.png
│ │ ├── select_prev@2x.png
│ │ ├── stop.png
│ │ ├── stop@2x.png
│ │ ├── th_automatic.png
│ │ ├── th_automatic@2x.png
│ │ ├── th_horizontal.png
│ │ ├── th_horizontal@2x.png
│ │ ├── th_vertical.png
│ │ └── th_vertical@2x.png
│ │ ├── elcl16
│ │ ├── clear.png
│ │ ├── clear@2x.png
│ │ ├── compare.png
│ │ ├── compare@2x.png
│ │ ├── debug.png
│ │ ├── debug@2x.png
│ │ ├── history_list.png
│ │ ├── history_list@2x.png
│ │ ├── relaunch.png
│ │ ├── relaunch@2x.png
│ │ ├── relaunchf.png
│ │ ├── relaunchf@2x.png
│ │ ├── report.png
│ │ ├── report@2x.png
│ │ ├── select_next.png
│ │ ├── select_next@2x.png
│ │ ├── select_prev.png
│ │ ├── select_prev@2x.png
│ │ ├── stop.png
│ │ ├── stop@2x.png
│ │ ├── th_automatic.png
│ │ ├── th_automatic@2x.png
│ │ ├── th_horizontal.png
│ │ ├── th_horizontal@2x.png
│ │ ├── th_vertical.png
│ │ └── th_vertical@2x.png
│ │ ├── eview16
│ │ ├── juniterr.gif
│ │ ├── juniterr.png
│ │ ├── juniterr@2x.png
│ │ ├── junitsucc.gif
│ │ ├── junitsucc.png
│ │ ├── junitsucc@2x.png
│ │ ├── stackframe.png
│ │ └── stackframe@2x.png
│ │ ├── main16
│ │ ├── testng-convert.gif
│ │ ├── testng-create.gif
│ │ ├── testng.gif
│ │ ├── testng_blur.gif
│ │ └── testng_noshadow.gif
│ │ ├── obj16
│ │ ├── exc_catch.png
│ │ ├── exc_catch@2x.png
│ │ ├── failures.png
│ │ ├── failures@2x.png
│ │ ├── stkfrm_obj.png
│ │ ├── stkfrm_obj@2x.png
│ │ ├── suiteskip.gif
│ │ ├── test.png
│ │ ├── test@2x.png
│ │ ├── testassumptionfailed.png
│ │ ├── testassumptionfailed@2x.png
│ │ ├── testerr.png
│ │ ├── testerr@2x.png
│ │ ├── testfail.png
│ │ ├── testfail@2x.png
│ │ ├── testhier.png
│ │ ├── testhier@2x.png
│ │ ├── testignored.png
│ │ ├── testignored@2x.png
│ │ ├── testok.png
│ │ ├── testok@2x.png
│ │ ├── testrun.png
│ │ ├── testrun@2x.png
│ │ ├── testskip.gif
│ │ ├── tsuite.png
│ │ ├── tsuite@2x.png
│ │ ├── tsuiteerror.png
│ │ ├── tsuiteerror@2x.png
│ │ ├── tsuitefail.png
│ │ ├── tsuitefail@2x.png
│ │ ├── tsuiteok.png
│ │ ├── tsuiteok@2x.png
│ │ ├── tsuiterun.png
│ │ └── tsuiterun@2x.png
│ │ ├── ovr16
│ │ ├── error_ovr.png
│ │ ├── error_ovr@2x.png
│ │ ├── failed_ovr.png
│ │ ├── failed_ovr@2x.png
│ │ ├── failureOnPercentage.gif
│ │ ├── skip.gif
│ │ ├── success_ovr.png
│ │ └── success_ovr@2x.png
│ │ └── wizban
│ │ ├── library_wiz.png
│ │ └── library_wiz@2x.png
├── lib
│ └── testng-remote.jar
├── plugin.properties
├── plugin.xml
├── pom.xml
├── schema
│ ├── launchConfigurationProvider.exsd
│ ├── reporterListenerContributorSchema.exsd
│ └── testListenerContributorSchema.exsd
└── src
│ ├── deprecated
│ └── com
│ │ └── beust
│ │ └── testng
│ │ ├── FailedTestSuiteGenerator.java
│ │ └── eclipse
│ │ ├── launch
│ │ ├── AlternateLaunchConfigurationTab.java
│ │ └── components
│ │ │ ├── ProjectBrowserComposite.java
│ │ │ └── SelectionTableComposite.java
│ │ └── ui
│ │ └── util
│ │ ├── FolderSelectionDialog.java
│ │ └── ProjectContentProvider.java
│ ├── main
│ ├── org
│ │ ├── eclipse
│ │ │ └── core
│ │ │ │ └── text
│ │ │ │ └── StringMatcher.java
│ │ └── testng
│ │ │ ├── eclipse
│ │ │ ├── Messages.java
│ │ │ ├── SystemSummarySection.java
│ │ │ ├── TestNGMessages.properties
│ │ │ ├── TestNGPlugin.java
│ │ │ ├── TestNGPluginConstants.java
│ │ │ ├── buildpath
│ │ │ │ ├── BuildPathSupport.java
│ │ │ │ ├── P2Utils.java
│ │ │ │ ├── TestNGContainerInitializer.java
│ │ │ │ └── TestNGHomeInitializer.java
│ │ │ ├── launch
│ │ │ │ ├── AbstractTestNGLaunchDelegate.java
│ │ │ │ ├── AnnotationSearchRequestor.java
│ │ │ │ ├── DebugEditorLaunchDelegate.java
│ │ │ │ ├── EmptyRemoteTestNG.java
│ │ │ │ ├── GroupSelector.java
│ │ │ │ ├── ITestNGLaunchConfigurationProvider.java
│ │ │ │ ├── LaunchConfigurationHelper.java
│ │ │ │ ├── MultiSelector.java
│ │ │ │ ├── RunEditorLaunchDelegate.java
│ │ │ │ ├── SuiteSelector.java
│ │ │ │ ├── SuiteSelector2.java
│ │ │ │ ├── TestFinder.java
│ │ │ │ ├── TestNGLaunchConfigurationConstants.java
│ │ │ │ ├── TestNGLaunchConfigurationDelegate.java
│ │ │ │ ├── TestNGLaunchShortcut.java
│ │ │ │ ├── TestNGMainTab.java
│ │ │ │ ├── TestNGSuiteLaunchShortcut.java
│ │ │ │ ├── TestNGTabGroup.java
│ │ │ │ ├── TestngTestSelector.java
│ │ │ │ ├── components
│ │ │ │ │ ├── AnnotationVisitor.java
│ │ │ │ │ ├── BaseVisitor.java
│ │ │ │ │ ├── CheckBoxTable.java
│ │ │ │ │ ├── Filters.java
│ │ │ │ │ ├── ITestContent.java
│ │ │ │ │ ├── NoTests.java
│ │ │ │ │ └── SuiteFileCheckBoxTable.java
│ │ │ │ └── tester
│ │ │ │ │ ├── FileExtender.java
│ │ │ │ │ ├── JavaTypeExtender.java
│ │ │ │ │ └── TestNGPropertyTester.java
│ │ │ ├── messages.properties
│ │ │ ├── refactoring
│ │ │ │ ├── ConvertFromJUnitAction.java
│ │ │ │ ├── ConvertFromJUnitCompositeChange.java
│ │ │ │ ├── ConvertFromJUnitRefactoring.java
│ │ │ │ ├── ConvertFromJUnitRefactoringContribution.java
│ │ │ │ ├── ConvertFromJUnitRefactoringDescriptor.java
│ │ │ │ ├── ConvertFromJUnitWizard.java
│ │ │ │ ├── ConvertToYamlAction.java
│ │ │ │ ├── CreateClassAction.java
│ │ │ │ ├── FindTestsRunnableContext.java
│ │ │ │ ├── ImportAssertRewriter.java
│ │ │ │ ├── PullTestRewriter.java
│ │ │ │ ├── PushTestRewriter.java
│ │ │ │ ├── SourceFolderChange.java
│ │ │ │ ├── TestNGQuickAssistProcessor.java
│ │ │ │ ├── TestNGVisitor.java
│ │ │ │ └── TestNGXmlPage.java
│ │ │ ├── ui
│ │ │ │ ├── AbstractTab.java
│ │ │ │ ├── AbstractTraceAction.java
│ │ │ │ ├── ClearResultsAction.java
│ │ │ │ ├── CompareResultDialog.java
│ │ │ │ ├── CompareResultsAction.java
│ │ │ │ ├── CounterPanel.java
│ │ │ │ ├── EclipseTestRunnerClient.java
│ │ │ │ ├── FailureNavigationAction.java
│ │ │ │ ├── FailureTab.java
│ │ │ │ ├── FailureTrace.java
│ │ │ │ ├── Images.java
│ │ │ │ ├── ImagesUtil.java
│ │ │ │ ├── MessageCopyAction.java
│ │ │ │ ├── OpenEditorAction.java
│ │ │ │ ├── OpenEditorAtLineAction.java
│ │ │ │ ├── OpenTestAction.java
│ │ │ │ ├── ProgressBar.java
│ │ │ │ ├── QuickRunAction.java
│ │ │ │ ├── RunHistoryAction.java
│ │ │ │ ├── RunInfo.java
│ │ │ │ ├── ShowNextFailureAction.java
│ │ │ │ ├── ShowPreviousFailureAction.java
│ │ │ │ ├── SuccessTab.java
│ │ │ │ ├── SuiteRunInfo.java
│ │ │ │ ├── TestNGAddLibraryProposal.java
│ │ │ │ ├── TestNGQuickFixProcessor.java
│ │ │ │ ├── TestRunInfo.java
│ │ │ │ ├── TestRunTab.java
│ │ │ │ ├── TestRunnerViewPart.java
│ │ │ │ ├── TraceCopyAction.java
│ │ │ │ ├── WatchResultThread.java
│ │ │ │ ├── buildpath
│ │ │ │ │ └── TestNGContainerWizardPage.java
│ │ │ │ ├── codemining
│ │ │ │ │ ├── TestCodeMining.java
│ │ │ │ │ └── TestCodeMiningProvider.java
│ │ │ │ ├── conversion
│ │ │ │ │ ├── AnnotationRewriter.java
│ │ │ │ │ ├── BaseQuickAssistProcessor.java
│ │ │ │ │ ├── IRewriteProvider.java
│ │ │ │ │ ├── JUnitConverterQuickAssistProcessor.java
│ │ │ │ │ ├── JUnitRewriteCorrectionProposal.java
│ │ │ │ │ ├── JUnitVisitor.java
│ │ │ │ │ └── Visitor.java
│ │ │ │ ├── preferences
│ │ │ │ │ ├── JdtPreferenceInjector.java
│ │ │ │ │ ├── PreferenceInitializer.java
│ │ │ │ │ ├── ProjectPropertyPage.java
│ │ │ │ │ ├── RunDebugPreferencePage.java
│ │ │ │ │ └── WorkspacePreferencePage.java
│ │ │ │ ├── summary
│ │ │ │ │ ├── AbstractFilter.java
│ │ │ │ │ ├── AbstractTableSorter.java
│ │ │ │ │ ├── RunInfoFilter.java
│ │ │ │ │ ├── RunInfoTableSorter.java
│ │ │ │ │ ├── StringFilter.java
│ │ │ │ │ ├── StringTableSorter.java
│ │ │ │ │ └── SummaryTab.java
│ │ │ │ ├── tree
│ │ │ │ │ ├── BaseTestMethodTreeItem.java
│ │ │ │ │ ├── BaseTreeItem.java
│ │ │ │ │ ├── ClassTreeItem.java
│ │ │ │ │ ├── ITreeItem.java
│ │ │ │ │ ├── SuiteTreeItem.java
│ │ │ │ │ ├── TestMethodParametersTreeItem.java
│ │ │ │ │ ├── TestMethodTreeItem.java
│ │ │ │ │ └── TestTreeItem.java
│ │ │ │ └── util
│ │ │ │ │ ├── ConfigurationHelper.java
│ │ │ │ │ ├── ProjectChooserDialog.java
│ │ │ │ │ ├── SuiteListSelectionDialog.java
│ │ │ │ │ ├── TestSelectionDialog.java
│ │ │ │ │ ├── TypeParser.java
│ │ │ │ │ └── Utils.java
│ │ │ ├── util
│ │ │ │ ├── CustomSuite.java
│ │ │ │ ├── DependencyInfo.java
│ │ │ │ ├── DependencyVisitor.java
│ │ │ │ ├── JDTUtil.java
│ │ │ │ ├── LaunchUtil.java
│ │ │ │ ├── ListenerContributorUtil.java
│ │ │ │ ├── PixelConverter.java
│ │ │ │ ├── PreferenceStoreUtil.java
│ │ │ │ ├── ReporterListenerContributor.java
│ │ │ │ ├── ResourceUtil.java
│ │ │ │ ├── SWTUtil.java
│ │ │ │ ├── StringUtils.java
│ │ │ │ ├── SuiteBuilder.java
│ │ │ │ ├── SuiteFileValidator.java
│ │ │ │ ├── SuiteGenerator.java
│ │ │ │ ├── TestListenerContributor.java
│ │ │ │ ├── TestSearchEngine.java
│ │ │ │ ├── TypeAndMethod.java
│ │ │ │ ├── Utils.java
│ │ │ │ ├── param
│ │ │ │ │ ├── ParameterSolver.java
│ │ │ │ │ └── TestNGMethodParameterVisitor.java
│ │ │ │ └── signature
│ │ │ │ │ ├── ASTMethodDescriptor.java
│ │ │ │ │ ├── IMethodDescriptor.java
│ │ │ │ │ ├── MethodDescriptor.java
│ │ │ │ │ └── TypeSignature.java
│ │ │ └── wizards
│ │ │ │ ├── NewTestNGClassWizard.java
│ │ │ │ ├── NewTestNGClassWizardPage.java
│ │ │ │ └── TestNGMethodWizardPage.java
│ │ │ └── xml
│ │ │ ├── LaunchSuite.java
│ │ │ └── SuiteGenerator.java
│ └── resources
│ │ └── git.properties
│ └── test
│ └── java
│ └── org
│ └── testng
│ └── eclipse
│ ├── convert
│ ├── DoublesPair.java
│ ├── JUnit3NoConversionTest1.java
│ ├── JUnit3NoConversionTest2.java
│ ├── JUnit3Test1.java
│ ├── JUnit3Test2.java
│ ├── JUnit3Test3.java
│ ├── JUnit3Test4.java
│ ├── JUnit4ParameterizedTest.java
│ ├── JUnit4Test1.java
│ ├── JUnit4Test2.java
│ ├── MyTestCase.java
│ ├── ObjectsPair.java
│ ├── Pair.java
│ └── QueueTracker.java
│ ├── create
│ └── CreateTestNGClassTest.java
│ ├── run
│ └── FailedConfigurationTest.java
│ └── ui
│ └── util
│ └── StringUtilsTest.java
├── testng-eclipse-update-site
├── .gitignore
├── .project
├── build.gradle
├── category.xml
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── pom.xml
└── settings.gradle
├── testng-maven-eclipse-feature
├── .project
├── build.properties
├── feature.properties
├── feature.xml
└── pom.xml
└── testng-maven-eclipse-plugin
├── .classpath
├── .project
├── META-INF
└── MANIFEST.MF
├── build.properties
├── plugin.properties
├── plugin.xml
├── pom.xml
└── src
└── org
└── testng
└── eclipse
└── maven
├── Activator.java
├── MavenTestNGLaunchConfigurationProvider.java
├── MavenTestNGOptionsConfigurationBlock.java
├── MavenTestNGPreferenceInitializer.java
├── MavenTestNGPreferencePage.java
├── Messages.java
├── Messages.properties
├── OptionsConfigurationBlock.java
└── PreferenceUtils.java
/.cvsignore:
--------------------------------------------------------------------------------
1 | build
2 |
3 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Problem Statement
2 | **please read https://github.com/cbeust/testng-eclipse/blob/master/docs/Troubleshooting.md first**
3 |
4 |
5 | ### Any relate message in "Error Log" view
6 | > "Windows -> Show View -> Others -> Error Log"
7 |
8 |
9 | ### The Dependency Management tool for your project
10 |
11 | - [ ] Maven
12 | - [ ] Gradle
13 | - [ ] Ant
14 | - [ ] Eclipse Buildpath (aka. Use "TestNG Library" for your project in Eclipse)
15 |
16 | ### Operating System
17 |
18 | - [ ] Windows
19 | - [ ] Linux
20 | - [ ] OSX
21 |
--------------------------------------------------------------------------------
/.github/workflows/maven.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a Java project with Maven
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3 |
4 | name: Java CI with Maven
5 |
6 | on:
7 | push:
8 | branches: [ master ]
9 | pull_request:
10 | branches: [ master ]
11 |
12 | jobs:
13 | build:
14 | runs-on: ubuntu-latest
15 |
16 | steps:
17 | - uses: actions/checkout@v4
18 | - uses: actions/setup-java@v4
19 | with:
20 | distribution: temurin
21 | java-version: 17
22 | cache: maven
23 |
24 | - name: Build with Maven
25 | run: |
26 | echo "MAVEN_OPTS='-Xmx1024m -Djava.net.preferIPv4Stack=true'" > ~/.mavenrc
27 | ./mvnw -e -U -Dci clean install
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | test-output
3 | target/
4 | .settings/
5 |
6 | .vscode/
7 | .idea/
8 |
9 | .DS_Store
10 |
11 | .gradle
12 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # https://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
19 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | testng-eclipse
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: java
3 | before_cache:
4 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
5 | - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
6 | cache:
7 | directories:
8 | - $HOME/.m2
9 | - $HOME/.gradle/caches/
10 | - $HOME/.gradle/wrapper/
11 | jdk:
12 | - openjdk8
13 |
14 | before_install: echo "MAVEN_OPTS='-Xmx1024m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true'" > ~/.mavenrc
15 |
16 | install: echo "skip 'mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V' step"
17 |
18 | script:
19 | - ./mvnw -e -U -Dci clean install
20 | - if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && [[ ${TRAVIS_BRANCH} == "master" ]]; then ./scripts/upload-updatesite; fi
21 |
--------------------------------------------------------------------------------
/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: maven
4 | directory: "/"
5 | schedule:
6 | interval: weekly
7 | open-pull-requests-limit: 10
8 |
--------------------------------------------------------------------------------
/docs/Troubleshooting.md:
--------------------------------------------------------------------------------
1 | Troubleshooting
2 | ====
3 |
4 | ## Can't install TestNG Eclipse Plugin
5 |
6 | **Note that, https://testng.org/testng-p2-update-site/ is the official update site for TestNG Eclipse Plugin**
7 |
8 | If you failed to install TestNG Eclipse Plugin with following error:
9 | * Unable to read repository at https://beust.com/eclipse/content.xml.
10 | * HTTP Service 'Service Unavailable': https://beust.com/eclipse-beta/content.xml
11 | * An error occurred while collecting items to be installed session context was:(profile=epp.package.committers, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Unable to read repository at https://beust.com/eclipse/updatesites/6.11.0.201703011520/plugins/org.testng.eclipse_6.11.0.201703011520.jar. Read timed out
12 |
13 | You can follow thses steps try to fix/bypass the problem:
14 | * Check if you have any http proxy setting, or behind the company firewall, make sure you can access the update site: `https://testng.org/testng-p2-update-site`
15 | * Add vmargs '-Djava.net.preferIPv4Stack=true' to Eclipse config.ini, read the wiki [[1]](https://wiki.eclipse.org/Eclipse.ini) for the detail.
16 | * Or, for whatever reason, you still can't access https://testng.org/testng-eclipse-update-site in the Eclipse IDE, you can download the [offline updatesite](https://github.com/cbeust/testng-eclipse#update-sites), then copy to your workstation.
17 |
18 |
19 | ## TestNG Eclipse Plugin not showing up
20 |
21 | On Windows platform, if you installed plugin succeed, but it's [not showing up](https://github.com/cbeust/testng-eclipse/issues/378#issuecomment-359957096), please make sure install Eclipse to a folder where your user has full rights (Ex., user home dir).
22 | see relate StackOverflow answer: https://stackoverflow.com/a/3448786/4867232
23 |
--------------------------------------------------------------------------------
/docs/download.md:
--------------------------------------------------------------------------------
1 | # Download Current Release Version
2 |
3 | - **Java 11+ is required** for running the TestNG for Eclipse plugin v7.8.0 and above.
4 |
5 | - **Java 8 is required** for running the TestNG for Eclipse plugin Upto v7.4.0.
6 |
7 | - **Eclipse 4.2 and above is required**. Eclipse 3.x is NOT supported
8 | any more, please update your Eclipse to 4.2 or above.
9 |
10 | You can use either the [Eclipse
11 | Marketplace](https://marketplace.eclipse.org/content/testng-eclipse) or
12 | the update site.
13 |
14 | ## Install via Eclipse Marketplace
15 |
16 | Go to the TestNG page on the Eclipse Market Place and drag the icon
17 | called "Install" onto your workspace.
18 |
19 | ## Install from update site
20 |
21 | - Select Help / Install New Software…
22 |
23 | - Enter the update site URL in "Work with:" field:
24 |
25 | - Update site for release:
26 | `https://testng.org/testng-eclipse-update-site`.
27 |
28 | - Make sure the check box next to URL is checked and click Next.
29 |
30 | - Eclipse will then guide you through the process.
31 |
32 | You can also install older versions of the plug-ins
33 | [here](https://beust.com/eclipse-old). Note that the URL’s on this page
34 | are update sites as well, not direct download links.
35 |
36 | # Build the TestNG Eclipse Plugin from source code
37 |
38 | TestNG Eclipse Plugin is [hosted on
39 | GitHub](https://github.com/testng-team/testng-eclipse), you can download
40 | the source code and [build by
41 | ourselves](https://github.com/testng-team/testng-eclipse/blob/master/README.md#building).
42 |
--------------------------------------------------------------------------------
/docs/pics/classes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/classes.png
--------------------------------------------------------------------------------
/docs/pics/convert1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/convert1.png
--------------------------------------------------------------------------------
/docs/pics/convert2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/convert2.png
--------------------------------------------------------------------------------
/docs/pics/failure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/failure.png
--------------------------------------------------------------------------------
/docs/pics/groups.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/groups.png
--------------------------------------------------------------------------------
/docs/pics/launch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/launch.png
--------------------------------------------------------------------------------
/docs/pics/m2e-pref.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/m2e-pref.png
--------------------------------------------------------------------------------
/docs/pics/m2e-prop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/m2e-prop.png
--------------------------------------------------------------------------------
/docs/pics/menu-convert2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/menu-convert2.png
--------------------------------------------------------------------------------
/docs/pics/menu-convert4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/menu-convert4.png
--------------------------------------------------------------------------------
/docs/pics/new-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/new-1.png
--------------------------------------------------------------------------------
/docs/pics/new-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/new-2.png
--------------------------------------------------------------------------------
/docs/pics/outline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/outline.png
--------------------------------------------------------------------------------
/docs/pics/preferences.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/preferences.png
--------------------------------------------------------------------------------
/docs/pics/project_properties.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/project_properties.png
--------------------------------------------------------------------------------
/docs/pics/refactoring1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/refactoring1.png
--------------------------------------------------------------------------------
/docs/pics/refactoring2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/refactoring2.png
--------------------------------------------------------------------------------
/docs/pics/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/search.png
--------------------------------------------------------------------------------
/docs/pics/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/success.png
--------------------------------------------------------------------------------
/docs/pics/suites.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/suites.png
--------------------------------------------------------------------------------
/docs/pics/summary1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/summary1.png
--------------------------------------------------------------------------------
/docs/pics/summary2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/summary2.png
--------------------------------------------------------------------------------
/docs/pics/template.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/template.png
--------------------------------------------------------------------------------
/docs/pics/view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/docs/pics/view.png
--------------------------------------------------------------------------------
/new-release:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ./mvnw -e -Dci clean install
4 |
5 | VER=$(echo $(basename `ls testng-eclipse-update-site/target/repository/features/org.testng.eclipse_*.jar`) | cut -d'_' -f2 | rev | cut -f 2- -d '.' | rev)
6 | echo "Build version: $VER"
7 |
8 | scripts/upload-updatesite 'release'
9 |
10 | git tag -a $VER -m "release $VER"
11 | git push origin $VER
12 |
--------------------------------------------------------------------------------
/scripts/new-release-old:
--------------------------------------------------------------------------------
1 |
2 | TESTNG_DIR=../testng/build/libs
3 |
4 | TESTNG_JAR=`ls -ltr ${TESTNG_DIR}/testng*jar|grep -v source|grep -v javadoc|awk '{print $9}'`
5 | cp -f ${TESTNG_JAR} testng-eclipse-plugin/lib/testng.jar
6 | TESTNG_SRC_JAR=`ls -ltr ${TESTNG_DIR}/testng*-sources.jar|awk '{print $9}'`
7 | cp -f ${TESTNG_SRC_JAR} testng-eclipse-plugin/lib/testng-sources.jar
8 |
9 | #scripts/set-version $1
10 | mvn clean package
11 |
12 | VER=$(echo $(basename `ls testng-eclipse-update-site/target/repository/features/org.testng.eclipse_*.jar`) | cut -d'_' -f2 | rev | cut -f 2- -d '.' | rev)
13 | echo "Created version: $VER"
14 |
15 | if [ $# -eq 1 ]
16 | then
17 | echo "Uploading..."
18 | ./upload-release -m $2
19 |
20 | git tag -a $VER -m "release $VER"
21 | git push origin $VER
22 | else
23 | echo "No message supplied, not uploading"
24 | fi
25 |
--------------------------------------------------------------------------------
/scripts/set-version:
--------------------------------------------------------------------------------
1 | if [ $# -ne 1 ]
2 | then
3 | echo "Need the version number"
4 | exit -1
5 | fi
6 |
7 | ./mvnw -e -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$1
8 |
--------------------------------------------------------------------------------
/scripts/upload-release:
--------------------------------------------------------------------------------
1 | UPDATE_SITE=$HOME/java/testng-eclipse/testng-eclipse-update-site/target/repository
2 | TMP=$HOME/t
3 |
4 | if [ $1 == "-m" ]
5 | then
6 | message=$2
7 | shift
8 | shift
9 | fi
10 |
11 | cd $UPDATE_SITE/plugins
12 |
13 | number=`ls -l org.testng.eclipse_*|cut -d '.' -f 3,4,5,6`
14 | jarName=$number
15 | jar=$UPDATE_SITE/plugins/org.testng.$number.jar
16 |
17 | cd ../../../..
18 |
19 | function verifyClassFiles() {
20 | ver=$TMP/eclipse-verify
21 | rm -rf $ver
22 | mkdir $ver
23 | cd $ver
24 | jar xf $jar
25 | #jar xf eclipse-testng.jar
26 |
27 | for i in `find . -name \*class`
28 | do
29 | v=`od -h $i | head -1 | awk '{print $5}'`
30 | if [ $v != "3100" ]
31 | then
32 | echo "Class $i has version $v, expected 3100"
33 | exit -1
34 | fi
35 | done
36 |
37 | echo "Class OK:"
38 | file org/testng/eclipse/TestNGPlugin.class
39 | }
40 |
41 | cd $UPDATE_SITE
42 | target=w/eclipse-old
43 | dir=${target}/$number
44 |
45 | ssh beust.com@beust.com "(rm -rf ${target}/$number && mkdir $dir)"
46 | scp -r * beust.com@beust.com:$dir
47 | ssh beust.com@beust.com "(cd w && rm -f eclipse && ln -s eclipse-old/$number eclipse)"
48 |
49 | if [ ! -z "$message" ]
50 | then
51 | echo $message >$TMP/$jarName.txt
52 | scp $TMP/$jarName.txt beust.com@beust.com:${target}
53 | fi
54 |
55 |
--------------------------------------------------------------------------------
/scripts/upload-updatesite:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # please don't share `~/.bintray.conf` to VCS since it must contain credentials as below:
4 | # BINTRAY_USER=xxx
5 | # BINTRAY_API_KEY=###
6 | if [ -f ~/.bintray.conf ]; then
7 | . ~/.bintray.conf
8 | fi
9 |
10 | BINTRAY_USER=${BINTRAY_USER:?bintray user is not defined}
11 | BINTRAY_API_KEY=${BINTRAY_API_KEY:?bintray api key is not defined}
12 |
13 | BUILD_MODE=$1
14 |
15 | base_dir=$(cd `dirname $0` && pwd)
16 | site_dir=$base_dir/../testng-eclipse-update-site/
17 |
18 | export BINTRAY_USER
19 | export BINTRAY_API_KEY
20 | export BUILD_MODE
21 |
22 | cd $site_dir
23 | ./gradlew --stacktrace
24 | cd -
25 |
--------------------------------------------------------------------------------
/target-platform.target:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/testng-eclipse-feature/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/testng-eclipse-feature/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/testng-eclipse-feature/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.testng.eclipse.feature
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.FeatureBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.pde.FeatureNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/testng-eclipse-feature/build.properties:
--------------------------------------------------------------------------------
1 | bin.includes = p2.inf,\
2 | feature.xml
3 |
--------------------------------------------------------------------------------
/testng-eclipse-feature/p2.inf:
--------------------------------------------------------------------------------
1 | instructions.configure=\
2 | org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:https${#58}//testng.org/testng-p2-update-site,type:0,name:TestNG P2,enabled:true);\
3 | org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:https${#58}//testng.org/testng-p2-update-site,type:1,name:TestNG P2,enabled:true);\
4 | org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:https${#58}//testng.org/testng-eclipse-update-site,type:0,name:TestNG Eclipse,enabled:true);\
5 | org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:https${#58}//testng.org/testng-eclipse-update-site,type:1,name:TestNG Eclipse,enabled:true);
6 |
--------------------------------------------------------------------------------
/testng-eclipse-feature/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | org.testng.eclipse
8 | org.testng.eclipse.parent
9 | 7.11.0-SNAPSHOT
10 |
11 | org.testng.eclipse.features
12 | org.testng.eclipse
13 | eclipse-feature
14 |
15 |
16 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.testng.eclipse
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 | org.eclipse.m2e.core.maven2Builder
25 |
26 |
27 |
28 |
29 |
30 | org.eclipse.m2e.core.maven2Nature
31 | org.eclipse.pde.PluginNature
32 | org.eclipse.jdt.core.javanature
33 |
34 |
35 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/.settings/org.eclipse.jdt.ui.prefs:
--------------------------------------------------------------------------------
1 | #Mon Nov 30 12:55:31 PST 2009
2 | eclipse.preferences.version=1
3 | formatter_profile=_Cedric
4 | formatter_settings_version=11
5 | internal.default.compliance=user
6 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: %pluginName
4 | Bundle-SymbolicName: org.testng.eclipse; singleton:=true
5 | Bundle-Version: 7.11.0.qualifier
6 | Bundle-Activator: org.testng.eclipse.TestNGPlugin
7 | Bundle-Vendor: %providerName
8 | Bundle-Localization: plugin
9 | Require-Bundle: org.eclipse.ui,
10 | org.eclipse.core.runtime,
11 | org.eclipse.core.expressions,
12 | org.eclipse.core.resources,
13 | org.eclipse.compare,
14 | org.eclipse.debug.core,
15 | org.eclipse.debug.ui,
16 | org.eclipse.jface,
17 | org.eclipse.jface.text,
18 | org.eclipse.jdt.core,
19 | org.eclipse.jdt.debug.ui,
20 | org.eclipse.jdt.junit,
21 | org.eclipse.jdt.launching;bundle-version="3.10",
22 | org.eclipse.jdt.ui,
23 | org.eclipse.ui.ide,
24 | org.eclipse.ui.workbench.texteditor,
25 | org.eclipse.search,
26 | org.eclipse.ltk.core.refactoring,
27 | org.eclipse.ltk.ui.refactoring,
28 | org.eclipse.core.variables,
29 | org.junit,
30 | org.eclipse.ui.editors,
31 | org.testng;bundle-version="[6.9.12,8.0.0)",
32 | org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[2.0.0,3.0.0)",
33 | org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)",
34 | com.google.guava;bundle-version="[15.0.0,40.0.0)"
35 | Bundle-RequiredExecutionEnvironment: JavaSE-17
36 | Bundle-ActivationPolicy: lazy
37 | Bundle-ClassPath: .,
38 | lib/testng-remote.jar
39 | Export-Package:
40 | org.testng.eclipse,
41 | org.testng.eclipse.buildpath,
42 | org.testng.eclipse.launch,
43 | org.testng.eclipse.launch.components,
44 | org.testng.eclipse.launch.tester,
45 | org.testng.eclipse.refactoring,
46 | org.testng.eclipse.ui,
47 | org.testng.eclipse.ui.buildpath,
48 | org.testng.eclipse.ui.conversion,
49 | org.testng.eclipse.ui.preferences,
50 | org.testng.eclipse.ui.summary,
51 | org.testng.eclipse.ui.tree,
52 | org.testng.eclipse.ui.util,
53 | org.testng.eclipse.util,
54 | org.testng.eclipse.util.param,
55 | org.testng.eclipse.util.signature,
56 | org.testng.eclipse.wizards
57 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/build.properties:
--------------------------------------------------------------------------------
1 | source.. = src/main/
2 | output.. = build/
3 | bin.includes = META-INF/,\
4 | .,\
5 | plugin.xml,\
6 | plugin.properties,\
7 | icons/,\
8 | schema/,\
9 | lib/testng-remote.jar
10 |
11 |
12 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/docs/TODO.txt:
--------------------------------------------------------------------------------
1 | Current version:
2 | - Multiple testng.xml files
3 | - Error message if class not found when running single-class test
4 | - Remove super(string) if converting from a JUnit class
5 |
6 |
7 |
8 |
9 | Next version:
10 | [2005.03.06]
11 | [TNGE-011]:[CRITICAL] better way to clean up the temp suite files
12 | [TNGE-002]: support running tests from selected directories (see TNGE-003)
13 | [TNGE-005]: Suite customizer
14 | [TNGE-007] The Green Bar Window should indicate what it just
15 | ran ("Suites: testng.xml" or "Groups: current assert"): started, still to refine
16 |
17 |
18 | DONE:
19 |
20 | [TNGE-008] Need to add a few i18n strings (in the green bar window)
21 | [TNGE-009] I think we should remove SPF from the green bar window (confusing
22 | and my guess is, not very used)
23 | [TNGE-010] Groups launcher
24 | [TNGE-006] Suite search is taking too long. Must be optimized!!!
25 | [TNGE-001] The Group dialog should reflect what was found in the text field
26 | (if anything). Right now, it always shows up with everything unchecked
27 | [TNGE-003] Remove duplicates in the group dialog
28 | [TNGE-004] [FIXED: 2005.03.23] I'm using checkboxes instead of radioboxes
29 | right now. Couldn't get the radio to work because the events don't tell you if
30 | you are being unchecked or checked.
31 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/docs/TestNG_Launch_Tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/docs/TestNG_Launch_Tab.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/compare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/compare.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/compare@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/compare@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/debug.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/debug@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/debug@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/history_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/history_list.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/history_list@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/history_list@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/relaunch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/relaunch.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/relaunch@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/relaunch@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/relaunchf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/relaunchf.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/relaunchf@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/relaunchf@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/report.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/report.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/report@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/report@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/select_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/select_next.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/select_next@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/select_next@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/select_prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/select_prev.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/select_prev@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/select_prev@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/stop.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/stop@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/stop@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/th_automatic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/th_automatic.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/th_automatic@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/th_automatic@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/th_horizontal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/th_horizontal.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/th_horizontal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/th_horizontal@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/th_vertical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/th_vertical.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/dlcl16/th_vertical@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/dlcl16/th_vertical@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/clear.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/clear@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/clear@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/compare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/compare.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/compare@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/compare@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/debug.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/debug@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/debug@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/history_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/history_list.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/history_list@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/history_list@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/relaunch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/relaunch.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/relaunch@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/relaunch@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/relaunchf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/relaunchf.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/relaunchf@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/relaunchf@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/report.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/report.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/report@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/report@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/select_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/select_next.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/select_next@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/select_next@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/select_prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/select_prev.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/select_prev@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/select_prev@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/stop.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/stop@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/stop@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/th_automatic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/th_automatic.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/th_automatic@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/th_automatic@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/th_horizontal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/th_horizontal.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/th_horizontal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/th_horizontal@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/th_vertical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/th_vertical.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/elcl16/th_vertical@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/elcl16/th_vertical@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/eview16/juniterr.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/eview16/juniterr.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/eview16/juniterr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/eview16/juniterr.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/eview16/juniterr@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/eview16/juniterr@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/eview16/junitsucc.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/eview16/junitsucc.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/eview16/junitsucc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/eview16/junitsucc.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/eview16/junitsucc@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/eview16/junitsucc@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/eview16/stackframe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/eview16/stackframe.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/eview16/stackframe@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/eview16/stackframe@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/main16/testng-convert.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/main16/testng-convert.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/main16/testng-create.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/main16/testng-create.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/main16/testng.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/main16/testng.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/main16/testng_blur.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/main16/testng_blur.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/main16/testng_noshadow.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/main16/testng_noshadow.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/exc_catch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/exc_catch.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/exc_catch@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/exc_catch@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/failures.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/failures.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/failures@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/failures@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/stkfrm_obj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/stkfrm_obj.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/stkfrm_obj@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/stkfrm_obj@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/suiteskip.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/suiteskip.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/test.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/test@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/test@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testassumptionfailed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testassumptionfailed.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testassumptionfailed@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testassumptionfailed@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testerr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testerr.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testerr@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testerr@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testfail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testfail.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testfail@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testfail@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testhier.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testhier.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testhier@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testhier@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testignored.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testignored.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testignored@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testignored@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testok.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testok@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testok@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testrun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testrun.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testrun@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testrun@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/testskip.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/testskip.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuite.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuite@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuite@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuiteerror.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuiteerror.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuiteerror@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuiteerror@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuitefail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuitefail.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuitefail@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuitefail@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuiteok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuiteok.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuiteok@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuiteok@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuiterun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuiterun.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/obj16/tsuiterun@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/obj16/tsuiterun@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/ovr16/error_ovr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/ovr16/error_ovr.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/ovr16/error_ovr@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/ovr16/error_ovr@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/ovr16/failed_ovr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/ovr16/failed_ovr.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/ovr16/failed_ovr@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/ovr16/failed_ovr@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/ovr16/failureOnPercentage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/ovr16/failureOnPercentage.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/ovr16/skip.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/ovr16/skip.gif
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/ovr16/success_ovr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/ovr16/success_ovr.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/ovr16/success_ovr@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/ovr16/success_ovr@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/wizban/library_wiz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/wizban/library_wiz.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/icons/full/wizban/library_wiz@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/icons/full/wizban/library_wiz@2x.png
--------------------------------------------------------------------------------
/testng-eclipse-plugin/lib/testng-remote.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/testng-team/testng-eclipse/4140befcdce937ea814f1c74c07813f9fe1583bf/testng-eclipse-plugin/lib/testng-remote.jar
--------------------------------------------------------------------------------
/testng-eclipse-plugin/plugin.properties:
--------------------------------------------------------------------------------
1 | pluginName=TestNG Eclipse Support
2 | providerName=Cedric Beust
3 |
4 | Launch.label=TestNG
5 | testRunTabs.name=TestNG
6 | TestNG4Eclipse.ResultView=TestNG
7 |
8 | TestNGShortcut.test.label=TestNG Test
9 | TestNGShortcut.suite.label=TestNG Suite
10 |
11 | TestNGCommand.run.test.label=Run TestNG Test
12 | TestNGCommand.run.suite.label=Run TestNG Suite
13 | TestNGCommand.debug.test.label=Debug TestNG Test
14 | TestNGCommand.debug.suite.label=Debug TestNG Suite
15 | TestNGCommand.convertToTestNG.label=Convert to TestNG
16 | TestNGCommand.convertToTestNG.desc=Convert the selection to TestNG
17 | TestNGCommand.createTestNGClass.label=Create TestNG class
18 | TestNGCommand.createTestNGClass.desc=Create a TestNG class to test this class
19 | TestNGCommand.convertToYaml.label=Convert to YAML
20 | TestNGCommand.convertToYaml.desc=Convert the TestNG Suite XML file to YAML
21 | TestNGCommand.shortcut.rerunLast.label=Rerun TestNG Test
22 | TestNGCommand.shortcut.rerunLast.desc=Rerun the last TestNG Test
23 | TestNGCommand.shortcut.rerunFailed.label=Rerun Failed TestNG Test
24 | TestNGCommand.shortcut.rerunFailed.desc=Rerun the failed TestNG Test
25 |
26 | template.testmethod.name=test
27 | template.testmethod.desc=test method (TestNG)
28 | template.setUpClass.name=setup
29 | template.setUpClass.desc=create class level setup stub (TestNG)
30 | template.tearDownClass.name=teardown
31 | template.tearDownClass.desc=create class level teardown stub (TestNG)
32 | template.setUpMethod.name=setup
33 | template.setUpMethod.desc=create method level setup stub (TestNG)
34 | template.tearDownMethod.name=teardown
35 | template.tearDownMethod.desc=create method level teardown stub (TestNG)
36 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/deprecated/com/beust/testng/eclipse/ui/util/ProjectContentProvider.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.util;
2 |
3 | import org.eclipse.core.resources.IContainer;
4 | import org.eclipse.core.resources.IResource;
5 | import org.eclipse.core.runtime.CoreException;
6 | import org.eclipse.jface.viewers.ITreeContentProvider;
7 | import org.eclipse.jface.viewers.Viewer;
8 |
9 |
10 | /**
11 | * Class usage XXX
12 | *
13 | * @version $Revision$
14 | */
15 | public class ProjectContentProvider implements ITreeContentProvider {
16 |
17 | /**
18 | * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
19 | */
20 | public Object[] getChildren(Object parentElement) {
21 | if(parentElement instanceof IContainer) {
22 | try {
23 | return ((IContainer) parentElement).members();
24 | } catch(CoreException ce) {
25 | ;
26 | }
27 | }
28 |
29 | return null;
30 | }
31 |
32 | /**
33 | * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
34 | */
35 | public Object getParent(Object element) {
36 | return ((IResource) element).getParent();
37 | }
38 |
39 | /**
40 | * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
41 | */
42 | public boolean hasChildren(Object element) {
43 | IResource resource = (IResource) element;
44 |
45 | if(IResource.FILE == resource.getType()) {
46 | return false;
47 | } else {
48 | return true;
49 | }
50 | }
51 |
52 | /**
53 | * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
54 | */
55 | public Object[] getElements(Object inputElement) {
56 | return getChildren(inputElement);
57 | }
58 |
59 | /**
60 | * @see org.eclipse.jface.viewers.IContentProvider#dispose()
61 | */
62 | public void dispose() {
63 | }
64 |
65 | /**
66 | * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
67 | */
68 | public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/Messages.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse;
2 |
3 | import org.eclipse.osgi.util.NLS;
4 |
5 | public class Messages extends NLS {
6 | private static final String BUNDLE_NAME = "org.testng.eclipse.messages"; //$NON-NLS-1$
7 | public static String mining_debug;
8 | public static String mining_run;
9 | public static String mining_runAll;
10 | static {
11 | // initialize resource bundle
12 | NLS.initializeMessages(BUNDLE_NAME, Messages.class);
13 | }
14 |
15 | private Messages() {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/SystemSummarySection.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse;
2 |
3 | import java.io.PrintWriter;
4 | import java.net.URL;
5 | import java.util.Properties;
6 |
7 | import org.eclipse.core.runtime.Platform;
8 | import org.eclipse.ui.about.ISystemSummarySection;
9 | import org.osgi.framework.Bundle;
10 |
11 | public class SystemSummarySection implements ISystemSummarySection {
12 |
13 | @Override
14 | public void write(PrintWriter writer) {
15 | Bundle bundle = Platform.getBundle(TestNGPlugin.PLUGIN_ID);
16 | URL fileURL = bundle.getEntry("git.properties");
17 | if (fileURL == null) {
18 | fileURL = this.getClass().getClassLoader().getResource("/git.properties");
19 | }
20 | Properties props = new Properties();
21 | try {
22 | props.load(fileURL.openStream());
23 |
24 | props.list(writer);
25 | } catch (Exception e) {
26 | TestNGPlugin.log(e);
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/TestNGPluginConstants.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse;
2 |
3 | import org.testng.remote.RemoteTestNG;
4 |
5 | /**
6 | * Constants used by the plug-in.
7 | */
8 | public abstract class TestNGPluginConstants {
9 | public static final int LAUNCH_ERROR = 1001;
10 | public static final int LAUNCH_ERROR_JVM_VER_NOT_COMPATIBLE = 1002;
11 | public static final int LAUNCH_ERROR_JVM_VER_UNKNOWN = 1003;
12 |
13 | public static final String TESTNG_HOME= "TESTNG_HOME"; //$NON-NLS-1$
14 | public static final String MAIN_RUNNER = RemoteTestNG.class.getName();
15 |
16 | public static final String S_OUTDIR= ".outdir"; //$NON-NLS-1$
17 | // public static final String S_REPORTERS = ".reporters";
18 | public static final String S_DISABLEDLISTENERS = ".disabledListeners";
19 | // public static final String S_PARALLEL = ".parallel";
20 | public static final String S_WATCH_RESULTS = ".watchResults";
21 | public static final String S_WATCH_RESULT_DIRECTORY = ".watchResultDirectory";
22 |
23 | public static final String S_FAILED_TESTS = "failedTests";
24 | public static final String S_XML_TEMPLATE_FILE = "xmlTemplateFile";
25 | public static final String S_JVM_ARGS = "jvmArgs";
26 | public static final String S_EXCLUDED_STACK_TRACES = "excludedStackTraces";
27 | public static final String S_SUITE_METHOD_TREATMENT = "suiteMethodTreatment";
28 | public static final String S_PRE_DEFINED_LISTENERS = "preDefinedListeners";
29 | public static final String S_SHOW_VIEW_WHEN_TESTS_COMPLETE = "showViewWhenTestComplete";
30 | public static final String S_SHOW_VIEW_ON_FAILURE_ONLY = "showViewOnFailureOnly";
31 | public static final String S_VIEW_TITLE_SHOW_CASE_NAME = "showCaseNameOnViewTitle";
32 | public static final String S_APPEND_FAVORITE_STATIC_IMPORT = "appendFavoriteStaticImport";
33 |
34 | /** The name of the TestNG DTD. */
35 | public static final String TESTNG_DTD = "testng-1.0.dtd";
36 |
37 | /** The URL to the deprecated TestNG DTD. */
38 | public static final String DEPRECATED_TESTNG_DTD_URL = "https://beust.com/testng/" + TESTNG_DTD;
39 |
40 | /** The URL to the TestNG DTD. */
41 | public static final String TESTNG_DTD_URL = "https://testng.org/" + TESTNG_DTD;
42 |
43 | private TestNGPluginConstants() {}
44 | }
45 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/buildpath/TestNGHomeInitializer.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.buildpath;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.net.URL;
6 |
7 | import org.eclipse.core.runtime.FileLocator;
8 | import org.eclipse.core.runtime.IPath;
9 | import org.eclipse.core.runtime.Path;
10 | import org.eclipse.core.runtime.Platform;
11 | import org.eclipse.jdt.core.ClasspathVariableInitializer;
12 | import org.eclipse.jdt.core.JavaCore;
13 | import org.eclipse.jdt.core.JavaModelException;
14 | import org.osgi.framework.Bundle;
15 | import org.testng.eclipse.TestNGPlugin;
16 | import org.testng.eclipse.TestNGPluginConstants;
17 |
18 |
19 | /**
20 | * This class/interface
21 | */
22 | public class TestNGHomeInitializer extends ClasspathVariableInitializer {
23 |
24 | /**
25 | * @see org.eclipse.jdt.core.ClasspathVariableInitializer#initialize(java.lang.String)
26 | */
27 | public void initialize(String variable) {
28 | try {
29 | Bundle bundle= Platform.getBundle(TestNGPlugin.PLUGIN_ID);
30 | if (bundle == null) {
31 | clearVariable();
32 | return;
33 | }
34 |
35 | URL local= null;
36 | try {
37 | local= FileLocator.toFileURL(bundle.getEntry("/")); //$NON-NLS-1$
38 | }
39 | catch (IOException e) {
40 | clearVariable();
41 | return;
42 | }
43 | IPath location= Path.fromOSString(new File(local.getPath()).getAbsolutePath());
44 | if (null != location) {
45 | JavaCore.setClasspathVariable(TestNGPluginConstants.TESTNG_HOME, location, null);
46 | }
47 | else {
48 | }
49 | }
50 | catch(JavaModelException jmex) {
51 | clearVariable();
52 | }
53 | }
54 |
55 | private void clearVariable() {
56 | JavaCore.removeClasspathVariable(TestNGPluginConstants.TESTNG_HOME, null);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/AnnotationSearchRequestor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | import java.util.Collection;
4 |
5 | import org.eclipse.core.runtime.CoreException;
6 | import org.eclipse.jdt.core.IJavaElement;
7 | import org.eclipse.jdt.core.IMember;
8 | import org.eclipse.jdt.core.IMethod;
9 | import org.eclipse.jdt.core.IType;
10 | import org.eclipse.jdt.core.ITypeHierarchy;
11 | import org.eclipse.jdt.core.search.SearchMatch;
12 | import org.eclipse.jdt.core.search.SearchRequestor;
13 |
14 | public class AnnotationSearchRequestor extends SearchRequestor {
15 |
16 | private final Collection fResult;
17 | private final ITypeHierarchy fHierarchy;
18 |
19 | public AnnotationSearchRequestor(ITypeHierarchy hierarchy, Collection result) {
20 | fHierarchy= hierarchy;
21 | fResult= result;
22 | }
23 |
24 | public void acceptSearchMatch(SearchMatch match) throws CoreException {
25 | if (match.getAccuracy() == SearchMatch.A_ACCURATE && !match.isInsideDocComment()) {
26 | Object element= match.getElement();
27 | if (element instanceof IType || element instanceof IMethod) {
28 | IMember member= (IMember) element;
29 | IType type= member.getElementType() == IJavaElement.TYPE ? (IType) member : member.getDeclaringType();
30 | addTypeAndSubtypes(type);
31 | }
32 | }
33 | }
34 |
35 | private void addTypeAndSubtypes(IType type) {
36 | if (fResult.add(type)) {
37 | IType[] subclasses= fHierarchy.getSubclasses(type);
38 | for (int i= 0; i < subclasses.length; i++) {
39 | addTypeAndSubtypes(subclasses[i]);
40 | }
41 | }
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/DebugEditorLaunchDelegate.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | public class DebugEditorLaunchDelegate extends AbstractTestNGLaunchDelegate {
4 |
5 | protected String getLaunchMode() {
6 | return "debug";
7 | }
8 |
9 | protected String getCommandPrefix() {
10 | return "Debug as";
11 | }
12 |
13 | protected String getTestShortcut() {
14 | return "M3+M2+D N";
15 | }
16 |
17 | protected String getSuiteShortcut() {
18 | return "M3+M2+D G";
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/EmptyRemoteTestNG.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | public class EmptyRemoteTestNG {
4 |
5 | public static void main(String[] args) {
6 | // System.out.println("Empty RemoteTestNG");
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/ITestNGLaunchConfigurationProvider.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | import java.util.List;
4 |
5 | import org.eclipse.core.runtime.CoreException;
6 | import org.eclipse.debug.core.ILaunchConfiguration;
7 |
8 | public interface ITestNGLaunchConfigurationProvider {
9 |
10 | /**
11 | * Returns VM arguments to be used with this vm install whenever the TestNG VM
12 | * is launched as they should be passed to the command line, or null if none.
13 | *
14 | * @param configuration
15 | * @return
16 | * @throws CoreException
17 | */
18 | String getVmArguments(ILaunchConfiguration configuration)
19 | throws CoreException;
20 |
21 | /**
22 | * Returns a list of environment variables to be used when launching the given
23 | * configuration or null if unspecified.
24 | *
25 | * @param configuration
26 | * @return
27 | * @throws CoreException
28 | */
29 | List getEnvironment(ILaunchConfiguration configuration)
30 | throws CoreException;
31 |
32 | /**
33 | * Return as list of classpath
34 | *
35 | * @param configuration
36 | * @return
37 | * @throws CoreException
38 | */
39 | List getClasspath(ILaunchConfiguration configuration)
40 | throws CoreException;
41 |
42 | /**
43 | * Returns extra program argument for TestNG
44 | *
45 | * @param configuration
46 | * @return
47 | * @throws CoreException
48 | */
49 | String getArguments(ILaunchConfiguration configuration) throws CoreException;
50 | }
51 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/LaunchConfigurationHelper.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | import org.testng.eclipse.ui.util.ConfigurationHelper;
4 | import org.testng.eclipse.util.JDTUtil;
5 |
6 | import java.util.ArrayList;
7 | import java.util.Arrays;
8 | import java.util.Collections;
9 | import java.util.HashSet;
10 | import java.util.List;
11 | import java.util.Set;
12 |
13 | import org.eclipse.core.resources.IProject;
14 | import org.eclipse.core.resources.IResource;
15 | import org.eclipse.core.resources.IWorkspaceRoot;
16 | import org.eclipse.core.resources.ResourcesPlugin;
17 | import org.eclipse.core.runtime.CoreException;
18 | import org.eclipse.debug.core.ILaunchConfiguration;
19 | import org.eclipse.jdt.core.IJavaProject;
20 |
21 |
22 | public class LaunchConfigurationHelper {
23 | public static IJavaProject getJavaProject(final ILaunchConfiguration conf) throws CoreException {
24 | String projectName = ConfigurationHelper.getProjectName(conf);
25 | return JDTUtil.getJavaProject(projectName);
26 | }
27 |
28 | public static IProject getProject(final ILaunchConfiguration conf) throws CoreException {
29 | String projectName = ConfigurationHelper.getProjectName(conf);
30 | return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
31 | }
32 |
33 | public static IResource[] findTestResources(final ILaunchConfiguration conf) throws CoreException {
34 | Set resources = new HashSet<>();
35 |
36 | resources.addAll(Arrays.asList(findResources(conf,
37 | TestNGLaunchConfigurationConstants.DIRECTORY_TEST_LIST)));
38 | resources.addAll(Arrays.asList(findResources(conf,
39 | TestNGLaunchConfigurationConstants.CLASS_TEST_LIST)));
40 | resources.addAll(Arrays.asList(findResources(conf,
41 | TestNGLaunchConfigurationConstants.SOURCE_TEST_LIST)));
42 | resources.addAll(Arrays.asList(findResources(conf,
43 | TestNGLaunchConfigurationConstants.SUITE_TEST_LIST)));
44 |
45 | return (IResource[]) resources.toArray(new IResource[resources.size()]);
46 | }
47 |
48 | public static IResource[] findResources(final ILaunchConfiguration conf,
49 | final String key) throws CoreException {
50 | List resources = new ArrayList<>();
51 | List containerPaths = conf.getAttribute(key, Collections. emptyList());
52 | IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
53 |
54 | for(String resPath : containerPaths) {
55 | IResource res = root.findMember(resPath);
56 |
57 | if(null != res) {
58 | resources.add(res);
59 | }
60 | }
61 |
62 | return (IResource[]) resources.toArray(new IResource[resources.size()]);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/RunEditorLaunchDelegate.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | public class RunEditorLaunchDelegate extends AbstractTestNGLaunchDelegate {
4 |
5 | protected String getLaunchMode() {
6 | return "run";
7 | }
8 |
9 | protected String getCommandPrefix() {
10 | return "Run as";
11 | }
12 |
13 | protected String getTestShortcut() {
14 | return "M3+M2+X N";
15 | }
16 |
17 | protected String getSuiteShortcut() {
18 | return "M3+M2+X G";
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/SuiteSelector.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | import org.eclipse.debug.core.ILaunchConfiguration;
4 | import org.eclipse.swt.SWT;
5 | import org.eclipse.swt.layout.GridData;
6 | import org.eclipse.swt.widgets.Button;
7 | import org.eclipse.swt.widgets.Composite;
8 | import org.eclipse.swt.widgets.FileDialog;
9 | import org.testng.eclipse.launch.TestNGLaunchConfigurationConstants.LaunchType;
10 | import org.testng.eclipse.ui.util.ConfigurationHelper;
11 | import org.testng.eclipse.util.ResourceUtil;
12 | import org.testng.eclipse.util.StringUtils;
13 |
14 | import java.util.List;
15 |
16 | /**
17 | * Allow the user to select one or many suite files in this launch configuration.
18 | *
19 | * @author cbeust
20 | */
21 | public class SuiteSelector extends TestngTestSelector {
22 |
23 | private Button m_suiteBrowseButton;
24 |
25 | SuiteSelector(TestNGMainTab callback, ButtonHandler handler, Composite comp) {
26 | super(callback, handler, LaunchType.SUITE, comp,
27 | "TestNGMainTab.label.suiteTest");
28 |
29 | Composite fill = new Composite(comp, SWT.NONE);
30 | GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
31 | gd.horizontalSpan = 2;
32 | gd.verticalIndent = 0;
33 | gd.heightHint = 1;
34 | fill.setLayoutData(gd);
35 |
36 | //
37 | // Search button
38 | //
39 | m_suiteBrowseButton = new Button(comp, SWT.PUSH);
40 | m_suiteBrowseButton.setText(ResourceUtil.getString("TestNGMainTab.label.browsefs")); //$NON-NLS-1$
41 |
42 | TestngTestSelector.ButtonHandler buttonHandler = new TestngTestSelector.ButtonHandler() {
43 | public void handleButton() {
44 | FileDialog fileDialog = new FileDialog(m_suiteBrowseButton.getShell(), SWT.OPEN);
45 | setText(fileDialog.open());
46 | }
47 | };
48 | ButtonAdapter adapter = new ButtonAdapter(getTestngType(), buttonHandler);
49 |
50 | m_suiteBrowseButton.addSelectionListener(adapter);
51 | gd = new GridData();
52 | gd.verticalIndent = 0;
53 | m_suiteBrowseButton.setLayoutData(gd);
54 |
55 | }
56 |
57 | @Override
58 | public void initializeFrom(ILaunchConfiguration configuration) {
59 | List suites = ConfigurationHelper.getSuites(configuration);
60 | setText(StringUtils.listToString(suites));
61 | }
62 | }
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/SuiteSelector2.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | import java.lang.reflect.InvocationTargetException;
4 | import java.util.ArrayList;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import java.util.List;
8 | import java.util.Map;
9 |
10 | import org.eclipse.core.resources.IFile;
11 | import org.eclipse.debug.core.ILaunchConfiguration;
12 | import org.eclipse.swt.widgets.Composite;
13 | import org.eclipse.swt.widgets.Shell;
14 | import org.testng.collections.Maps;
15 | import org.testng.eclipse.launch.TestNGLaunchConfigurationConstants.LaunchType;
16 | import org.testng.eclipse.launch.components.CheckBoxTable;
17 | import org.testng.eclipse.launch.components.SuiteFileCheckBoxTable;
18 | import org.testng.eclipse.ui.util.ConfigurationHelper;
19 | import org.testng.eclipse.util.StringUtils;
20 | import org.testng.eclipse.util.TestSearchEngine;
21 |
22 | /**
23 | * Allow the user to select one or many suite files in this launch configuration.
24 | *
25 | * @author cbeust
26 | */
27 | public class SuiteSelector2 extends MultiSelector {
28 |
29 | SuiteSelector2(TestNGMainTab callback, Composite comp) {
30 | super(callback, comp, LaunchType.SUITE, "TestNGMainTab.label.suiteTest",
31 | "CheckBoxTable.suites.title");
32 | // make it editable to be able to modify the order easier
33 | setTextEditable(true);
34 | }
35 |
36 | @Override
37 | protected Collection getValues(ILaunchConfiguration configuration) {
38 | TestNGMainTab mainTab = getCallback();
39 | List result = new ArrayList<>();
40 | try {
41 | IFile[] types = TestSearchEngine.findSuites(mainTab.getLaunchConfigurationDialog(),
42 | new Object[] {mainTab.getSelectedProject()});
43 | for(IFile f : types) {
44 | result.add(f.getProjectRelativePath().toString());
45 | }
46 | } catch (InvocationTargetException | InterruptedException e) {
47 | e.printStackTrace();
48 | }
49 |
50 | return result;
51 | }
52 |
53 | @Override
54 | public void initializeFrom(ILaunchConfiguration configuration) {
55 | List names = ConfigurationHelper.getSuites(configuration);
56 | setText(StringUtils.listToString(names));
57 | }
58 |
59 | @Override
60 | protected Map> onSelect(String[] selectedValues) {
61 | Map> result = Maps.newHashMap();
62 | for (String s : selectedValues) {
63 | result.put(s, Collections.emptyList());
64 | }
65 | return result;
66 | }
67 |
68 | @Override
69 | protected CheckBoxTable getCheckBoxTable(Shell shell, String[] values, String titleId){
70 | return new SuiteFileCheckBoxTable(getCallback().getShell(), values, titleId);
71 | }
72 | }
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/TestNGSuiteLaunchShortcut.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 | import org.eclipse.core.resources.IFile;
4 | import org.eclipse.debug.ui.ILaunchShortcut;
5 | import org.eclipse.jface.viewers.ISelection;
6 | import org.eclipse.jface.viewers.StructuredSelection;
7 | import org.eclipse.ui.IEditorInput;
8 | import org.eclipse.ui.IEditorPart;
9 | import org.testng.eclipse.util.LaunchUtil;
10 |
11 | /**
12 | * Suite contextual launcher.
13 | *
14 | * @author Alexandru Popescu
15 | */
16 | public class TestNGSuiteLaunchShortcut implements ILaunchShortcut {
17 |
18 | public void launch(ISelection selection, String mode) {
19 | if(selection instanceof StructuredSelection) {
20 | run((IFile) ((StructuredSelection) selection).getFirstElement(), mode);
21 | }
22 | }
23 |
24 | /**
25 | * FIXME: not supported yet
26 | * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String)
27 | */
28 | public void launch(IEditorPart editor, String mode) {
29 | IEditorInput input = editor.getEditorInput();
30 | IFile suiteFile = (IFile) input.getAdapter(IFile.class);
31 |
32 | if(null != suiteFile) {
33 | run(suiteFile, mode);
34 | }
35 | }
36 |
37 | protected void run(IFile suiteFile, String mode) {
38 | LaunchUtil.launchSuiteConfiguration(suiteFile, mode);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/TestNGTabGroup.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch;
2 |
3 |
4 | import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
5 | import org.eclipse.debug.ui.CommonTab;
6 | import org.eclipse.debug.ui.EnvironmentTab;
7 | import org.eclipse.debug.ui.ILaunchConfigurationDialog;
8 | import org.eclipse.debug.ui.ILaunchConfigurationTab;
9 | import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
10 | import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
11 | import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
12 | import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;
13 |
14 | public class TestNGTabGroup extends AbstractLaunchConfigurationTabGroup {
15 | public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
16 | ILaunchConfigurationTab[] tabs= new ILaunchConfigurationTab[] {
17 | new TestNGMainTab(),
18 | // new AlternateLaunchConfigurationTab(),
19 | new JavaArgumentsTab(),
20 | new JavaClasspathTab(),
21 | new JavaJRETab(),
22 | new SourceLookupTab(),
23 | new EnvironmentTab(),
24 | new CommonTab()
25 | };
26 |
27 | setTabs(tabs);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/components/ITestContent.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch.components;
2 |
3 | import org.eclipse.jdt.core.IMethod;
4 | import org.testng.eclipse.util.signature.IMethodDescriptor;
5 |
6 | import java.util.Collection;
7 | import java.util.Set;
8 |
9 | public interface ITestContent {
10 | public boolean isTestNGClass();
11 |
12 | /**
13 | * Returns a Set.
14 | */
15 | Set getTestMethods();
16 |
17 | boolean hasTestMethods();
18 |
19 | Collection getGroups();
20 |
21 | boolean isTestMethod(IMethod imethod);
22 |
23 | String getAnnotationType();
24 | }
25 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/components/NoTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2003-2009 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.testng.eclipse.launch.components;
18 |
19 | import java.util.Collection;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | import org.eclipse.jdt.core.IMethod;
24 | import org.testng.eclipse.util.signature.IMethodDescriptor;
25 |
26 | /**
27 | * @author Andrew Eisenberg
28 | * @created Oct 30, 2009
29 | *
30 | */
31 | public class NoTests implements ITestContent {
32 |
33 | public String getAnnotationType() {
34 | return "";
35 | }
36 |
37 | public Collection getGroups() {
38 | return Collections.emptyList();
39 | }
40 |
41 | public Set getTestMethods() {
42 | return Collections.emptySet();
43 | }
44 |
45 | public boolean hasTestMethods() {
46 | return false;
47 | }
48 |
49 | public boolean isTestMethod(IMethod imethod) {
50 | return false;
51 | }
52 |
53 | public boolean isTestNGClass() {
54 | return false;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/tester/FileExtender.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch.tester;
2 |
3 | import org.eclipse.core.resources.IFile;
4 | import org.eclipse.core.runtime.CoreException;
5 | import org.testng.eclipse.TestNGPlugin;
6 | import org.testng.eclipse.util.SuiteFileValidator;
7 |
8 |
9 | /**
10 | * Property tester contributing the org.testng.eclipse.isSuite property to
11 | * file matching the criteria: *.xml, instanceof IFile and being a suite.
12 | *
13 | * @author Alexandru Popescu
14 | */
15 | public class FileExtender {
16 | // private static final String PROPERTY_IS_Test= "isSuite"; //$NON-NLS-1$
17 |
18 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue,
19 | boolean xmlOnly) {
20 | if(!(receiver instanceof IFile)) {
21 | return false;
22 | }
23 | try {
24 | return SuiteFileValidator.isSuiteDefinition((IFile) receiver, xmlOnly);
25 | }
26 | catch(CoreException ce) {
27 | TestNGPlugin.log(ce);
28 | }
29 |
30 | return false;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/launch/tester/JavaTypeExtender.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.launch.tester;
2 |
3 | import org.eclipse.core.expressions.PropertyTester;
4 | import org.eclipse.jdt.core.IJavaElement;
5 | import org.testng.eclipse.util.TestSearchEngine;
6 |
7 |
8 | public class JavaTypeExtender extends PropertyTester {
9 |
10 | public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
11 | if(!(receiver instanceof IJavaElement)) {
12 | return false;
13 | }
14 | return isTest((IJavaElement) receiver);
15 | }
16 |
17 | public static boolean isTest(IJavaElement javaElement) {
18 | int javaElementType = javaElement.getElementType();
19 |
20 | if(IJavaElement.JAVA_PROJECT == javaElementType
21 | || IJavaElement.PACKAGE_FRAGMENT_ROOT == javaElementType
22 | || IJavaElement.PACKAGE_FRAGMENT == javaElementType) {
23 | return true;
24 | }
25 |
26 | if(IJavaElement.COMPILATION_UNIT == javaElementType
27 | || IJavaElement.TYPE == javaElementType
28 | || IJavaElement.METHOD == javaElementType) {
29 | return TestSearchEngine.isTest(javaElement);
30 | }
31 |
32 | return false;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/messages.properties:
--------------------------------------------------------------------------------
1 | mining_debug=Debug
2 | mining_run=Run
3 | mining_runAll=Run All
4 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/ConvertFromJUnitAction.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.core.commands.AbstractHandler;
4 | import org.eclipse.core.commands.ExecutionEvent;
5 | import org.eclipse.core.commands.ExecutionException;
6 | import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
7 | import org.eclipse.swt.widgets.Event;
8 | import org.eclipse.swt.widgets.Shell;
9 | import org.eclipse.ui.IWorkbenchPage;
10 | import org.eclipse.ui.PlatformUI;
11 |
12 | public class ConvertFromJUnitAction extends AbstractHandler {
13 |
14 | @Override
15 | public void dispose() {
16 | }
17 |
18 | public Object execute(ExecutionEvent event) throws ExecutionException {
19 | Event ev = (Event) event.getTrigger();
20 | run(ev.display.getActiveShell());
21 | return null;
22 | }
23 |
24 | private void run(Shell shell) {
25 | if (shell == null) {
26 | // We won't have an active shell if the user right-clicked on an item without
27 | // selecting it first
28 | shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
29 | }
30 |
31 | if (shell == null) {
32 | System.out.println("Can't get a shell, is the Eclipse window active?");
33 | return;
34 | }
35 |
36 | // RefactoringProcessor processor = new RenamePropertyProcessor( info );
37 | IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
38 | ConvertFromJUnitRefactoring ref = new ConvertFromJUnitRefactoring(page, null /* status */);
39 | ConvertFromJUnitWizard wizard = new ConvertFromJUnitWizard(ref, 0);
40 | RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
41 | try {
42 | String titleForFailedChecks = ""; //$NON-NLS-1$
43 | op.run(shell, titleForFailedChecks);
44 | } catch( InterruptedException irex ) {
45 | // operation was cancelled
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/ConvertFromJUnitRefactoring.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.core.runtime.CoreException;
4 | import org.eclipse.core.runtime.IProgressMonitor;
5 | import org.eclipse.core.runtime.OperationCanceledException;
6 | import org.eclipse.ltk.core.refactoring.Change;
7 | import org.eclipse.ltk.core.refactoring.Refactoring;
8 | import org.eclipse.ltk.core.refactoring.RefactoringStatus;
9 | import org.eclipse.ui.IWorkbenchPage;
10 |
11 | public class ConvertFromJUnitRefactoring extends Refactoring {
12 | private RefactoringStatus m_status = new RefactoringStatus();
13 | private IWorkbenchPage m_page;
14 |
15 | public ConvertFromJUnitRefactoring(IWorkbenchPage page, RefactoringStatus status) {
16 | m_page = page;
17 | }
18 |
19 | @Override
20 | public String getName() {
21 | return "Convert from JUnit";
22 | }
23 |
24 | @Override
25 | public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
26 | throws CoreException, OperationCanceledException {
27 | return m_status;
28 | }
29 |
30 | @Override
31 | public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
32 | throws CoreException, OperationCanceledException {
33 | return m_status;
34 | }
35 |
36 | @Override
37 | public Change createChange(IProgressMonitor pm) throws CoreException,
38 | OperationCanceledException
39 | {
40 | return new ConvertFromJUnitCompositeChange(pm, m_page);
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/ConvertFromJUnitRefactoringContribution.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.ltk.core.refactoring.RefactoringContribution;
4 | import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
5 |
6 | import java.util.Map;
7 |
8 | public class ConvertFromJUnitRefactoringContribution extends RefactoringContribution {
9 | public static final String REFACTORING_ID = "org.testng.eclipse.refactoring.convertfromjunit3";
10 |
11 | @Override
12 | public RefactoringDescriptor createDescriptor(String id, String project,
13 | String description, String comment, Map arguments, int flags)
14 | throws IllegalArgumentException
15 | {
16 | return new ConvertFromJUnitRefactoringDescriptor(REFACTORING_ID, project,
17 | description, comment, flags);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/ConvertFromJUnitRefactoringDescriptor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.core.runtime.CoreException;
4 | import org.eclipse.ltk.core.refactoring.Refactoring;
5 | import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
6 | import org.eclipse.ltk.core.refactoring.RefactoringStatus;
7 |
8 | public class ConvertFromJUnitRefactoringDescriptor extends RefactoringDescriptor {
9 |
10 | public ConvertFromJUnitRefactoringDescriptor(String refactoringId,
11 | String project, String string, String string2, int structuralChange)
12 | {
13 | super(refactoringId, project, string, string2, structuralChange);
14 | }
15 |
16 | @Override
17 | public Refactoring createRefactoring(RefactoringStatus status)
18 | throws CoreException
19 | {
20 | return new ConvertFromJUnitRefactoring(null /* page */, status);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/ConvertFromJUnitWizard.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.ltk.core.refactoring.Refactoring;
4 | import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
5 |
6 | public class ConvertFromJUnitWizard extends RefactoringWizard {
7 |
8 | private TestNGXmlPage m_xmlPage;
9 |
10 | public ConvertFromJUnitWizard(Refactoring refactoring, int flags) {
11 | super(refactoring, flags);
12 | }
13 |
14 | @Override
15 | protected void addUserInputPages() {
16 | m_xmlPage = new TestNGXmlPage();
17 | addPage(m_xmlPage);
18 | }
19 |
20 | @Override
21 | public boolean performFinish() {
22 | if (m_xmlPage.generateXmlFile()) {
23 | m_xmlPage.finish();
24 | }
25 |
26 | return super.performFinish();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/CreateClassAction.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.core.commands.AbstractHandler;
4 | import org.eclipse.core.commands.ExecutionEvent;
5 | import org.eclipse.core.commands.ExecutionException;
6 | import org.eclipse.jface.wizard.WizardDialog;
7 | import org.eclipse.swt.widgets.Shell;
8 | import org.eclipse.ui.PlatformUI;
9 | import org.testng.eclipse.wizards.NewTestNGClassWizard;
10 |
11 | /**
12 | * Create a TestNG class based on the class currently selected.
13 | *
14 | * @author Cedric Beust
15 | */
16 | public class CreateClassAction extends AbstractHandler {
17 |
18 | public Object execute(ExecutionEvent event) throws ExecutionException {
19 | Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
20 | WizardDialog dialog = new WizardDialog(shell, new NewTestNGClassWizard());
21 | dialog.create();
22 | dialog.open();
23 |
24 | return null;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/FindTestsRunnableContext.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.core.runtime.NullProgressMonitor;
4 | import org.eclipse.jface.operation.IRunnableContext;
5 | import org.eclipse.jface.operation.IRunnableWithProgress;
6 |
7 | import java.lang.reflect.InvocationTargetException;
8 |
9 | public class FindTestsRunnableContext implements IRunnableContext {
10 |
11 | public void run(boolean fork, boolean cancelable,
12 | IRunnableWithProgress runnable) throws InvocationTargetException,
13 | InterruptedException {
14 | runnable.run(new NullProgressMonitor());
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/ImportAssertRewriter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.jdt.core.dom.AST;
4 | import org.eclipse.jdt.core.dom.CompilationUnit;
5 | import org.eclipse.jdt.core.dom.ImportDeclaration;
6 | import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
7 | import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
8 | import org.testng.eclipse.ui.conversion.IRewriteProvider;
9 |
10 | public class ImportAssertRewriter implements IRewriteProvider {
11 |
12 | private String m_assert;
13 |
14 | public ImportAssertRewriter(String node) {
15 | m_assert = node;
16 | }
17 |
18 | public ASTRewrite createRewriter(CompilationUnit astRoot, AST ast) {
19 | final ASTRewrite result = ASTRewrite.create(astRoot.getAST());
20 | TestNGVisitor visitor = new TestNGVisitor();
21 | astRoot.accept(visitor);
22 |
23 | //
24 | // Add a static import for this method
25 | //
26 | ListRewrite lr = result.getListRewrite(astRoot, CompilationUnit.IMPORTS_PROPERTY);
27 | ImportDeclaration id = ast.newImportDeclaration();
28 | id.setStatic(true);
29 | id.setName(ast.newName("org.testng.AssertJUnit." + m_assert));
30 | lr.insertFirst(id, null);
31 |
32 | return result;
33 | }
34 |
35 | public String getName() {
36 | return "Add static import 'org.testng.AssertJUnit." + m_assert + "'";
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/PullTestRewriter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.jdt.core.dom.AST;
4 | import org.eclipse.jdt.core.dom.Annotation;
5 | import org.eclipse.jdt.core.dom.CompilationUnit;
6 | import org.eclipse.jdt.core.dom.MarkerAnnotation;
7 | import org.eclipse.jdt.core.dom.TypeDeclaration;
8 | import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
9 | import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
10 | import org.testng.eclipse.ui.conversion.IRewriteProvider;
11 |
12 | /**
13 | * A rewriter that pulls all the @Test annotations at the class level.
14 | *
15 | * @author Cedric Beust
16 | */
17 | public class PullTestRewriter implements IRewriteProvider {
18 |
19 | public ASTRewrite createRewriter(CompilationUnit astRoot, AST ast) {
20 | final ASTRewrite result = ASTRewrite.create(astRoot.getAST());
21 | TestNGVisitor visitor = new TestNGVisitor();
22 | astRoot.accept(visitor);
23 |
24 | //
25 | // Remove all the @Test annotations
26 | //
27 | for (Annotation a: visitor.getTestMethods().values()) {
28 | result.remove(a, null);
29 | }
30 |
31 | //
32 | // Add @Test at the class level
33 | //
34 | MarkerAnnotation test = ast.newMarkerAnnotation();
35 | test.setTypeName(ast.newName("Test"));
36 | ListRewrite lr = result.getListRewrite(visitor.getType(), TypeDeclaration.MODIFIERS2_PROPERTY);
37 | lr.insertFirst(test, null);
38 |
39 | return result;
40 | }
41 |
42 | public String getName() {
43 | return "Pull @Test annotations to the class level";
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/PushTestRewriter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.jdt.core.dom.AST;
4 | import org.eclipse.jdt.core.dom.CompilationUnit;
5 | import org.eclipse.jdt.core.dom.MarkerAnnotation;
6 | import org.eclipse.jdt.core.dom.MethodDeclaration;
7 | import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
8 | import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
9 | import org.testng.eclipse.ui.conversion.IRewriteProvider;
10 |
11 | /**
12 | * A rewriter that removes the @Test annotation on the class and moves it
13 | * to all the public methods.
14 | *
15 | * @author Cedric Beust
16 | */
17 | public class PushTestRewriter implements IRewriteProvider {
18 |
19 | public ASTRewrite createRewriter(CompilationUnit astRoot, AST ast) {
20 | final ASTRewrite result = ASTRewrite.create(astRoot.getAST());
21 | TestNGVisitor visitor = new TestNGVisitor();
22 | astRoot.accept(visitor);
23 |
24 | //
25 | // Remove the class @Test annotation
26 | //
27 | result.remove(visitor.getTestClassAnnotation(), null);
28 |
29 | //
30 | // Add a @Test annotation on all the public methods that don't already
31 | // have a TestNG annotation.
32 | //
33 | for (MethodDeclaration md : visitor.getPublicMethods()) {
34 | ListRewrite lr = result.getListRewrite(md, MethodDeclaration.MODIFIERS2_PROPERTY);
35 | MarkerAnnotation test = ast.newMarkerAnnotation();
36 | test.setTypeName(ast.newSimpleName("Test"));
37 | lr.insertFirst(test, null);
38 | }
39 |
40 | return result;
41 | }
42 |
43 | public String getName() {
44 | return "Move the @Test class annotation into the class";
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/refactoring/SourceFolderChange.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.refactoring;
2 |
3 | import org.eclipse.core.resources.IFile;
4 | import org.eclipse.core.resources.IResource;
5 | import org.eclipse.jdt.core.ICompilationUnit;
6 | import org.eclipse.jdt.core.JavaCore;
7 | import org.eclipse.jdt.core.JavaModelException;
8 | import org.eclipse.jdt.core.dom.AST;
9 | import org.eclipse.jdt.core.dom.ASTParser;
10 | import org.eclipse.jdt.core.dom.CompilationUnit;
11 | import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
12 | import org.eclipse.ltk.core.refactoring.Change;
13 | import org.eclipse.ltk.core.refactoring.CompositeChange;
14 | import org.eclipse.ltk.core.refactoring.TextFileChange;
15 | import org.eclipse.text.edits.TextEdit;
16 | import org.testng.eclipse.ui.conversion.AnnotationRewriter;
17 |
18 | import java.util.Collection;
19 |
20 | /**
21 | * A composite change that applies to a source folder.
22 | *
23 | * @author Cedric Beust
24 | */
25 | public class SourceFolderChange extends CompositeChange {
26 |
27 | public SourceFolderChange(String path, Collection resources) {
28 | super(path);
29 | for (IResource resource : resources) {
30 | add(createChange(resource));
31 | }
32 | // Unchecking all non test folders. I wish I could also collaps them in the
33 | // tree but I haven't found how to do this yet.
34 | setEnabled(path.contains("test/"));
35 | }
36 |
37 | private Change createChange(IResource resource) {
38 | TextFileChange result = null;
39 | // creation of DOM/AST from a ICompilationUnit
40 | ASTParser parser = ASTParser.newParser(AST.JLS3);
41 | // We need the binding to be able to retrieve the types of the expressions in
42 | // the visitor (this is used to determine whether the assert() and fail() method
43 | // invocations can be found on the AssertJUnit class or not. If not, we don't
44 | // rewrite them since they are probably defined on the super class.
45 | parser.setResolveBindings(true);
46 | parser.setSource((ICompilationUnit) JavaCore.create(resource));
47 | CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
48 |
49 | // AST ast = context.getASTRoot().getAST();
50 | AST ast = astRoot.getAST();
51 | ASTRewrite rewriter = new AnnotationRewriter().createRewriter(astRoot, ast);
52 | try {
53 | TextEdit edit = rewriter.rewriteAST();
54 | result = new TextFileChange(resource.getName(), (IFile) resource);
55 | result.setEdit(edit);
56 | } catch (JavaModelException e) {
57 | e.printStackTrace();
58 | } catch (IllegalArgumentException e) {
59 | e.printStackTrace();
60 | }
61 |
62 | return result;
63 | }
64 | }
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/ClearResultsAction.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui;
2 |
3 | import org.eclipse.jface.action.Action;
4 | import org.testng.eclipse.TestNGPlugin;
5 | import org.testng.eclipse.util.ResourceUtil;
6 |
7 | import java.util.List;
8 |
9 | public class ClearResultsAction extends Action {
10 | private List m_tabs;
11 |
12 | public ClearResultsAction(List tabs) {
13 | m_tabs = tabs;
14 | setImageDescriptor(TestNGPlugin.getImageDescriptor("elcl16/clear.png"));
15 | setToolTipText(ResourceUtil.getString("TestRunnerViewPart.clearResults.tooltip")); //$NON-NLS-1$
16 | }
17 |
18 | public void run() {
19 | for (TestRunTab tab : m_tabs) {
20 | tab.aboutToStart();
21 | }
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/CompareResultsAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2000, 2004 IBM Corporation and others.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Common Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/cpl-v10.html
7 | *
8 | * Contributors:
9 | * IBM Corporation - initial API and implementation
10 | *******************************************************************************/
11 | package org.testng.eclipse.ui;
12 |
13 | import static org.testng.eclipse.ui.Images.IMG_COMPARE;
14 | import static org.testng.eclipse.ui.Images.IMG_COMPARE_DISABLED;
15 | import static org.testng.eclipse.ui.Images.IMG_COMPARE_HOVER;
16 |
17 | import org.eclipse.jface.action.Action;
18 | import org.testng.eclipse.util.ResourceUtil;
19 |
20 | /**
21 | * Action to enable/disable stack trace filtering.
22 | */
23 | public class CompareResultsAction extends Action {
24 | private FailureTrace fView;
25 |
26 | public CompareResultsAction(FailureTrace view) {
27 | super(ResourceUtil.getString("CompareResultsAction.label")); //$NON-NLS-1$
28 | setDescription(ResourceUtil.getString("CompareResultsAction.description")); //$NON-NLS-1$
29 | setToolTipText(ResourceUtil.getString("CompareResultsAction.tooltip")); //$NON-NLS-1$
30 |
31 | setDisabledImageDescriptor(Images.getImageDescriptor(IMG_COMPARE_DISABLED));
32 | setHoverImageDescriptor(Images.getImageDescriptor(IMG_COMPARE_HOVER));
33 | setImageDescriptor(Images.getImageDescriptor(IMG_COMPARE));
34 |
35 | fView= view;
36 | }
37 |
38 | /*
39 | * @see Action#actionPerformed
40 | */
41 | public void run() {
42 | CompareResultDialog dialog= new CompareResultDialog(fView.getShell(), fView.getFailedTest());
43 | dialog.create();
44 | dialog.open();
45 | }
46 | }
47 |
48 |
49 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/FailureNavigationAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id$
3 | * $Date$
4 | */
5 | package org.testng.eclipse.ui;
6 |
7 | import org.testng.eclipse.TestNGPlugin;
8 | import org.testng.eclipse.util.ResourceUtil;
9 |
10 | import org.eclipse.jface.action.Action;
11 |
12 |
13 | /**
14 | * Class usage XXX
15 | *
16 | * @version $Revision$
17 | */
18 | public class FailureNavigationAction extends Action {
19 | private TestRunnerViewPart fPart;
20 |
21 | public FailureNavigationAction(TestRunnerViewPart part) {
22 | super(ResourceUtil.getString("ShowNextFailureAction.label")); //$NON-NLS-1$
23 | setDisabledImageDescriptor(TestNGPlugin.getImageDescriptor("dlcl16/select_next.png")); //$NON-NLS-1$
24 | setHoverImageDescriptor(TestNGPlugin.getImageDescriptor("elcl16/select_next.png")); //$NON-NLS-1$
25 | setImageDescriptor(TestNGPlugin.getImageDescriptor("elcl16/select_next.png")); //$NON-NLS-1$
26 | setToolTipText(ResourceUtil.getString("ShowNextFailureAction.tooltip")); //$NON-NLS-1$
27 | fPart= part;
28 | }
29 |
30 | public void run() {
31 | fPart.selectNextFailure();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/FailureTab.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui;
2 |
3 | import org.testng.ITestResult;
4 |
5 | /*
6 | * A view that shows the contents of a test suite as a tree,
7 | * with the additional property of showing only the failed
8 | * tests.
9 | */
10 | public class FailureTab extends AbstractTab {
11 |
12 | // public FailureTab() {
13 | // super(true /* delay creation */);
14 | // }
15 |
16 | @Override
17 | public String getTooltipKey() {
18 | return "FailureRunView.tab.tooltip";
19 | }
20 |
21 | @Override
22 | public String getNameKey() {
23 | return "FailureRunView.tab.title"; //$NON-NLS-1$
24 | }
25 |
26 | @Override
27 | protected boolean acceptTestResult(RunInfo runInfo) {
28 | int status = runInfo.getStatus();
29 | return ITestResult.FAILURE == status;
30 | }
31 |
32 | // @Override
33 | // public void updateTestResult(RunInfo treeEntry) {
34 | // if (null == treeEntry) {
35 | // return;
36 | // }
37 | //
38 | // if (RunInfo.RESULT_TYPE == treeEntry.getType()) {
39 | // if (ITestResult.SUCCESS != treeEntry.getStatus() && ITestResult.SKIP != treeEntry.getStatus()) {
40 | // super.updateTestResult(treeEntry);
41 | // }
42 | // }
43 | // }
44 | //
45 | // @Override
46 | // protected void onPostUpdate(TreeItem ti, int state) {
47 | // // Horrible hack to remove all the SUCCESS nodes from our view. It's a hack because they
48 | // // shouldn't have been added there in the first place. Without this hack, this tab
49 | // // will still show green tree items for tests that have no errors.
50 | // if (state == ITestResult.SUCCESS) {
51 | // ti.dispose();
52 | // }
53 | // }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/ImagesUtil.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui;
2 |
3 | import org.eclipse.swt.graphics.Image;
4 | import org.testng.ITestResult;
5 |
6 | public class ImagesUtil {
7 |
8 | public static Image getImage(int state) {
9 | switch(state) {
10 | case ITestResult.SUCCESS:
11 | return Images.getImage(Images.IMG_TEST_OK);
12 | case ITestResult.FAILURE:
13 | case ITestResult.SUCCESS_PERCENTAGE_FAILURE:
14 | return Images.getImage(Images.IMG_TEST_FAIL);
15 | case ITestResult.SKIP:
16 | return Images.getImage(Images.IMG_TEST_SKIP);
17 | default:
18 | throw new IllegalArgumentException("Illegal state: " + state);
19 | }
20 | }
21 |
22 | /**
23 | * @return the icon to display for a suite with the given state.
24 | */
25 | public static Image getSuiteImage(int state) {
26 | switch(state) {
27 | case ITestResult.SUCCESS:
28 | return Images.getImage(Images.IMG_SUITE_OK);
29 | case ITestResult.FAILURE:
30 | case ITestResult.SUCCESS_PERCENTAGE_FAILURE:
31 | return Images.getImage(Images.IMG_SUITE_FAIL);
32 | case ITestResult.SKIP:
33 | return Images.getImage(Images.IMG_SUITE_SKIP);
34 | default:
35 | throw new IllegalArgumentException("Illegal state:" + state);
36 | }
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/MessageCopyAction.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui;
2 |
3 | import org.eclipse.swt.dnd.Clipboard;
4 |
5 | /**
6 | * Copy the first line of the failure trace to the clipboard.
7 | */
8 | public class MessageCopyAction extends AbstractTraceAction {
9 |
10 | /**
11 | * Constructor for CopyTraceAction.
12 | * @param view
13 | * @param clipboard
14 | */
15 | public MessageCopyAction(FailureTrace view, Clipboard clipboard) {
16 | super(view, clipboard, "Copy TestNG message");
17 | }
18 |
19 | /*
20 | * Copy the first line of the failure trace to the clipboard.
21 | * @see IAction#run()
22 | */
23 | public void run() {
24 | transfer(getFView().getMessage());
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/ShowNextFailureAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2000, 2004 IBM Corporation and others.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Common Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/cpl-v10.html
7 | *
8 | * Contributors:
9 | * IBM Corporation - initial API and implementation
10 | *******************************************************************************/
11 | package org.testng.eclipse.ui;
12 |
13 | import org.testng.eclipse.TestNGPlugin;
14 | import org.testng.eclipse.util.ResourceUtil;
15 |
16 | import org.eclipse.jface.action.Action;
17 |
18 | class ShowNextFailureAction extends Action {
19 |
20 | private TestRunnerViewPart fPart;
21 |
22 | public ShowNextFailureAction(TestRunnerViewPart part) {
23 | super(ResourceUtil.getString("ShowNextFailureAction.label")); //$NON-NLS-1$
24 | setDisabledImageDescriptor(TestNGPlugin.getImageDescriptor("dlcl16/select_next.png")); //$NON-NLS-1$
25 | setHoverImageDescriptor(TestNGPlugin.getImageDescriptor("elcl16/select_next.png")); //$NON-NLS-1$
26 | setImageDescriptor(TestNGPlugin.getImageDescriptor("elcl16/select_next.png")); //$NON-NLS-1$
27 | setToolTipText(ResourceUtil.getString("ShowNextFailureAction.tooltip")); //$NON-NLS-1$
28 | fPart= part;
29 | }
30 |
31 | public void run() {
32 | fPart.selectNextFailure();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/ShowPreviousFailureAction.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2000, 2004 IBM Corporation and others.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Common Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/cpl-v10.html
7 | *
8 | * Contributors:
9 | * IBM Corporation - initial API and implementation
10 | *******************************************************************************/
11 | package org.testng.eclipse.ui;
12 |
13 | import org.testng.eclipse.TestNGPlugin;
14 | import org.testng.eclipse.util.ResourceUtil;
15 |
16 | import org.eclipse.jface.action.Action;
17 |
18 | class ShowPreviousFailureAction extends Action {
19 |
20 | private TestRunnerViewPart fPart;
21 |
22 | public ShowPreviousFailureAction(TestRunnerViewPart part) {
23 | super(ResourceUtil.getString("ShowPreviousFailureAction.label")); //$NON-NLS-1$
24 | setDisabledImageDescriptor(TestNGPlugin.getImageDescriptor("dlcl16/select_prev.png")); //$NON-NLS-1$
25 | setHoverImageDescriptor(TestNGPlugin.getImageDescriptor("elcl16/select_prev.png")); //$NON-NLS-1$
26 | setImageDescriptor(TestNGPlugin.getImageDescriptor("elcl16/select_prev.png")); //$NON-NLS-1$
27 | setToolTipText(ResourceUtil.getString("ShowPreviousFailureAction.tooltip")); //$NON-NLS-1$
28 | fPart= part;
29 | }
30 |
31 | public void run() {
32 | fPart.selectPreviousFailure();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/SuccessTab.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui;
2 |
3 | /*
4 | * A view that shows the contents of a test suite as a tree.
5 | */
6 | public class SuccessTab extends AbstractTab {
7 |
8 | @Override
9 | public String getTooltipKey() {
10 | return "HierarchyRunView.tab.tooltip";
11 | }
12 |
13 | @Override
14 | public String getNameKey() {
15 | return "HierarchyRunView.tab.title"; //$NON-NLS-1$
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/TestRunInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * $Id$
3 | * $Date$
4 | */
5 | package org.testng.eclipse.ui;
6 |
7 |
8 | import java.util.HashMap;
9 | import java.util.Map;
10 |
11 |
12 | /**
13 | * Class usage XXX
14 | *
15 | * @version $Revision$
16 | */
17 | public class TestRunInfo {
18 | protected String m_suiteName;
19 | protected String m_testName;
20 | protected int m_testMethodCount;
21 | protected int m_passedTestCount;
22 | protected int m_failedTestCount;
23 | protected int m_skippedTestCount;
24 | protected int m_failedOnPercentangeCount;
25 |
26 | protected Map m_tests = new HashMap();
27 |
28 | public String getId() {
29 | return m_suiteName + "." + m_testName;
30 | }
31 |
32 | private static class TestKey {
33 | protected String m_className;
34 | protected String m_methodName;
35 |
36 |
37 | /**
38 | * Returns true
if this TestKey
is the same as the o argument.
39 | *
40 | * @return true
if this TestKey
is the same as the o argument.
41 | */
42 | public boolean equals(Object o) {
43 | if(this == o) {
44 | return true;
45 | }
46 | if((null == o) || !(o instanceof TestKey)) {
47 | return false;
48 | }
49 |
50 | TestKey castedObj = (TestKey) o;
51 |
52 | return (((this.m_className == null) ? (castedObj.m_className == null)
53 | : this.m_className.equals(castedObj.m_className))
54 | && ((this.m_methodName == null) ? (castedObj.m_methodName == null)
55 | : this.m_methodName.equals(castedObj.m_methodName)));
56 | }
57 |
58 | /**
59 | * Override hashCode.
60 | *
61 | * @return the Objects hashcode.
62 | */
63 | public int hashCode() {
64 | int hashCode = 1;
65 | hashCode = (31 * hashCode) + ((m_className == null) ? 0 : m_className.hashCode());
66 | hashCode = (31 * hashCode) + ((m_methodName == null) ? 0 : m_methodName.hashCode());
67 |
68 | return hashCode;
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/TraceCopyAction.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui;
2 |
3 | import org.eclipse.swt.dnd.Clipboard;
4 |
5 | /**
6 | * Copy the failure trace to the clipboard.
7 | */
8 | public class TraceCopyAction extends AbstractTraceAction {
9 |
10 | /**
11 | * Constructor for CopyTraceAction.
12 | * @param view
13 | * @param clipboard
14 | */
15 | public TraceCopyAction(FailureTrace view, Clipboard clipboard) {
16 | super(view, clipboard, "Copy TestNG trace");
17 | }
18 |
19 | /*
20 | * Copy the failure trace to the clipboard.
21 | * @see IAction#run()
22 | */
23 | public void run() {
24 | transfer(getFView().getTrace());
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/WatchResultThread.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui;
2 |
3 | import org.testng.remote.strprotocol.IRemoteSuiteListener;
4 | import org.testng.remote.strprotocol.IRemoteTestListener;
5 | import org.testng.xml.ResultXMLParser;
6 |
7 | import java.io.File;
8 | import java.io.FileInputStream;
9 | import java.io.FileNotFoundException;
10 |
11 | /**
12 | * Create a thread that monitors testng-results.xml.
13 | *
14 | * @author Cedric Beust
15 | */
16 | public class WatchResultThread {
17 | private static final boolean DEBUG = false;
18 |
19 | private Runnable m_watchResultRunnable;
20 | private boolean m_watchResults = true;
21 | private Thread m_watchResultThread;
22 |
23 | public WatchResultThread(final String path, final IRemoteSuiteListener suiteListener,
24 | final IRemoteTestListener testListener)
25 | {
26 | m_watchResultRunnable = new Runnable() {
27 | public void run() {
28 | File f = new File(path, "testng-results.xml");
29 | long timeStamp = f.lastModified();
30 | p("Watching " + path);
31 | while (m_watchResults) {
32 | long t = f.lastModified();
33 | p("Comparing " + t + " and " + timeStamp + " for " + f);
34 | if (t != timeStamp) {
35 | p("The file changed, updating the view");
36 | timeStamp = t;
37 | ResultXMLParser parser = new ResultXMLParser(suiteListener, testListener);
38 | try {
39 | parser.parse(path, new FileInputStream(f), false /* don't load classes */);
40 | } catch (FileNotFoundException e) {
41 | // Ignore
42 | }
43 | }
44 |
45 | try {
46 | Thread.sleep(5000);
47 | } catch (InterruptedException e) {
48 | e.printStackTrace();
49 | }
50 | }
51 | p("No longer watching " + path);
52 | }
53 | };
54 | m_watchResultThread = new Thread(m_watchResultRunnable);
55 | m_watchResultThread.start();
56 | }
57 |
58 | private static void p(String string) {
59 | if (DEBUG) {
60 | System.out.println("[WatchResultThread] " + string);
61 | }
62 | }
63 |
64 | public void stopWatching() {
65 | m_watchResults = false;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/buildpath/TestNGContainerWizardPage.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.buildpath;
2 |
3 | import org.eclipse.jdt.core.IClasspathEntry;
4 | import org.eclipse.jdt.core.JavaCore;
5 | import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
6 | import org.eclipse.jface.dialogs.Dialog;
7 | import org.eclipse.jface.wizard.WizardPage;
8 | import org.eclipse.swt.SWT;
9 | import org.eclipse.swt.layout.GridLayout;
10 | import org.eclipse.swt.widgets.Composite;
11 | import org.eclipse.swt.widgets.Label;
12 | import org.testng.eclipse.TestNGPlugin;
13 | import org.testng.eclipse.buildpath.TestNGContainerInitializer;
14 | import org.testng.eclipse.util.ResourceUtil;
15 |
16 | public class TestNGContainerWizardPage extends WizardPage implements IClasspathContainerPage {
17 |
18 | public TestNGContainerWizardPage() {
19 | super("TestNGContainerWizardPage"); //$NON-NLS-1$
20 | setTitle(ResourceUtil.getString("TestNGContainerWizardPage.title")); //$NON-NLS-1$
21 | setDescription(ResourceUtil.getString("TestNGContainerWizardPage.description")); //$NON-NLS-1$
22 | setImageDescriptor(TestNGPlugin.getImageDescriptor("wizban/library_wiz.png")); //$NON-NLS-1$
23 | }
24 |
25 | public void createControl(Composite parent) {
26 | Composite container = new Composite(parent, SWT.NONE);
27 | GridLayout layout = new GridLayout();
28 | layout.marginHeight = 0;
29 | layout.marginWidth = 0;
30 | container.setLayout(layout);
31 |
32 | new Label(container, SWT.NONE).setText(ResourceUtil.getString("TestNGContainerWizardPage.message")); //$NON-NLS-1$
33 |
34 | setControl(container);
35 | Dialog.applyDialogFont(container);
36 | }
37 |
38 | public boolean finish() {
39 | return true;
40 | }
41 |
42 | public IClasspathEntry getSelection() {
43 | return JavaCore.newContainerEntry(TestNGContainerInitializer.TESTNG_PATH);
44 | }
45 |
46 | public void setSelection(IClasspathEntry containerEntry) {
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/codemining/TestCodeMining.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.codemining;
2 |
3 | import org.eclipse.jdt.core.IJavaElement;
4 | import org.eclipse.jdt.core.ISourceReference;
5 | import org.eclipse.jdt.core.JavaModelException;
6 | import org.eclipse.jface.text.BadLocationException;
7 | import org.eclipse.jface.text.IDocument;
8 | import org.eclipse.jface.text.codemining.ICodeMiningProvider;
9 | import org.eclipse.jface.text.codemining.LineHeaderCodeMining;
10 | import org.eclipse.jface.viewers.StructuredSelection;
11 | import org.testng.eclipse.launch.TestNGLaunchShortcut;
12 |
13 | public class TestCodeMining extends LineHeaderCodeMining {
14 |
15 | public TestCodeMining(IJavaElement element, IDocument document,
16 | ICodeMiningProvider provider, String label, String mode) throws BadLocationException, JavaModelException {
17 | super(resolveLine(element, document), document, provider,e -> handle(element, mode));
18 | super.setLabel(label);
19 |
20 |
21 | }
22 |
23 | private static void handle(IJavaElement element, String mode) {
24 | TestNGLaunchShortcut shortcut = new TestNGLaunchShortcut();
25 | shortcut.launch(new StructuredSelection(element), mode);
26 | }
27 |
28 | private static int resolveLine(IJavaElement element, IDocument document) throws BadLocationException, JavaModelException {
29 | return document.getLineOfOffset(((ISourceReference)element).getNameRange().getOffset());
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/conversion/BaseQuickAssistProcessor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.conversion;
2 |
3 | import org.eclipse.jdt.core.ICompilationUnit;
4 | import org.eclipse.jdt.core.dom.AST;
5 | import org.eclipse.jdt.core.dom.ASTParser;
6 | import org.eclipse.jdt.core.dom.CompilationUnit;
7 |
8 | /**
9 | * The base class for our AST visitors.
10 | *
11 | * @author Cedric Beust
12 | */
13 | public class BaseQuickAssistProcessor {
14 |
15 | public static CompilationUnit createCompilationUnit(ICompilationUnit cu) {
16 | ASTParser parser = ASTParser.newParser(AST.JLS3);
17 | parser.setSource(cu);
18 | parser.setResolveBindings(true);
19 |
20 | return (CompilationUnit) parser.createAST(null);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/conversion/IRewriteProvider.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.conversion;
2 |
3 | import org.eclipse.jdt.core.dom.AST;
4 | import org.eclipse.jdt.core.dom.CompilationUnit;
5 | import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
6 |
7 | /**
8 | * Interface implemented by all the rewriters
9 | *
10 | * Created on Aug 8, 2005
11 | * @author cbeust
12 | */
13 | public interface IRewriteProvider {
14 |
15 | public ASTRewrite createRewriter(CompilationUnit astRoot, AST ast);
16 |
17 | public String getName();
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/conversion/JUnitConverterQuickAssistProcessor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.conversion;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import org.eclipse.core.runtime.CoreException;
7 | import org.eclipse.jdt.core.ICompilationUnit;
8 | import org.eclipse.jdt.core.IImportDeclaration;
9 | import org.eclipse.jdt.core.IType;
10 | import org.eclipse.jdt.core.dom.AST;
11 | import org.eclipse.jdt.core.dom.CompilationUnit;
12 | import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
13 | import org.eclipse.jdt.ui.text.java.IInvocationContext;
14 | import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
15 | import org.eclipse.jdt.ui.text.java.IProblemLocation;
16 | import org.eclipse.jdt.ui.text.java.IQuickAssistProcessor;
17 |
18 | public class JUnitConverterQuickAssistProcessor
19 | extends BaseQuickAssistProcessor
20 | implements IQuickAssistProcessor
21 | {
22 |
23 | /**
24 | * This method needs to return fast since the QuickAssist pop up is waiting on it.
25 | */
26 | public boolean hasAssists(IInvocationContext context) throws CoreException {
27 | IImportDeclaration[] imports = context.getCompilationUnit().getImports();
28 | // See if we have any JUnit import
29 | for (int i = 0; i < imports.length; i++) {
30 | IImportDeclaration id = imports[i];
31 | String name = id.getElementName();
32 | if (name.indexOf("junit") != -1) {
33 | return true;
34 | }
35 | }
36 |
37 | // Nothing in the imports, try to make a guess based on the class name and superclass
38 | IType[] types = context.getCompilationUnit().getTypes();
39 | for (IType type : types) {
40 | if (type.getFullyQualifiedName().contains("Test")) {
41 | return true;
42 | }
43 | }
44 | // ppp("HAS ASSISTS:" + result);
45 | return false;
46 | }
47 |
48 | public IJavaCompletionProposal[] getAssists(IInvocationContext context,
49 | IProblemLocation[] locations)
50 | throws CoreException
51 | {
52 | List vResult = new ArrayList<>();
53 |
54 | if (hasAssists(context)) {
55 | //
56 | // Prepare the AST rewriting
57 | //
58 | ICompilationUnit cu = context.getCompilationUnit();
59 |
60 | // Creatie of DOM/AST from a ICompilationUnit
61 | CompilationUnit astRoot = createCompilationUnit(cu);
62 | AST ast = context.getASTRoot().getAST();
63 |
64 | IRewriteProvider[] providers = new IRewriteProvider[] {
65 | new AnnotationRewriter(),
66 | };
67 |
68 | for (int i = 0; i < providers.length; i++) {
69 | ASTRewrite rewriter = providers[i].createRewriter(astRoot, ast);
70 | vResult.add(new JUnitRewriteCorrectionProposal(
71 | providers[i].getName(), cu, rewriter, 1));
72 | }
73 | }
74 |
75 | return vResult.toArray(new IJavaCompletionProposal[vResult.size()]);
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/conversion/Visitor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.conversion;
2 |
3 | import org.eclipse.jdt.core.dom.ASTVisitor;
4 | import org.eclipse.jdt.core.dom.Annotation;
5 | import org.eclipse.jdt.core.dom.IExtendedModifier;
6 | import org.eclipse.jdt.core.dom.MethodDeclaration;
7 | import org.eclipse.jdt.core.dom.TypeDeclaration;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | * Base class for all our visitors.
13 | *
14 | * @author Cedric Beust
15 | */
16 | public class Visitor extends ASTVisitor {
17 | @SuppressWarnings("unchecked")
18 | protected Annotation getAnnotation(MethodDeclaration md, String annotation) {
19 | return getAnnotation(md.modifiers(), annotation);
20 | }
21 |
22 | @SuppressWarnings("unchecked")
23 | protected Annotation getAnnotation(TypeDeclaration td, String annotation) {
24 | return getAnnotation(td.modifiers(), annotation);
25 | }
26 |
27 | private Annotation getAnnotation(List modifiers, String annotation) {
28 | for (IExtendedModifier m : modifiers) {
29 | if (m.isAnnotation()) {
30 | Annotation a = (Annotation) m;
31 | if (annotation.equals(a.getTypeName().toString())) {
32 | return a;
33 | }
34 | }
35 | }
36 |
37 | return null;
38 | }
39 |
40 | /**
41 | * @return true if the given method is annotated with the annotation
42 | */
43 | protected boolean hasAnnotation(MethodDeclaration md, String annotation) {
44 | return getAnnotation(md, annotation) != null;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/preferences/JdtPreferenceInjector.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.preferences;
2 |
3 | import java.io.IOException;
4 | import java.util.Arrays;
5 | import java.util.LinkedHashSet;
6 | import java.util.Set;
7 |
8 | import org.eclipse.jdt.ui.PreferenceConstants;
9 | import org.eclipse.jface.preference.IPreferenceStore;
10 | import org.eclipse.jface.util.IPropertyChangeListener;
11 | import org.eclipse.jface.util.PropertyChangeEvent;
12 | import org.eclipse.ui.IStartup;
13 | import org.eclipse.ui.preferences.ScopedPreferenceStore;
14 | import org.testng.eclipse.TestNGPlugin;
15 | import org.testng.eclipse.TestNGPluginConstants;
16 |
17 | import com.google.common.base.Joiner;
18 |
19 | public class JdtPreferenceInjector implements IStartup, IPropertyChangeListener {
20 |
21 | private static final String assertClassName = "org.testng.Assert";
22 |
23 | @Override
24 | public void earlyStartup() {
25 | initializeFavoriteStatic();
26 | }
27 |
28 | @Override
29 | public void propertyChange(PropertyChangeEvent event) {
30 | if (PreferenceConstants.CODEASSIST_FAVORITE_STATIC_MEMBERS.equals(event.getProperty())) {
31 | // check if user manully removed testng assert
32 | if (event.getOldValue().toString().contains(assertClassName)
33 | && !event.getNewValue().toString().contains(assertClassName)) {
34 | IPreferenceStore store = TestNGPlugin.getDefault().getPreferenceStore();
35 | store.setValue(TestNGPluginConstants.S_APPEND_FAVORITE_STATIC_IMPORT, false);
36 | try {
37 | ((ScopedPreferenceStore) store).save();
38 | } catch (IOException e) {
39 | }
40 | }
41 | }
42 | }
43 |
44 | private void initializeFavoriteStatic() {
45 | IPreferenceStore store = TestNGPlugin.getDefault().getPreferenceStore();
46 | boolean appendFavorite = store.getBoolean(TestNGPluginConstants.S_APPEND_FAVORITE_STATIC_IMPORT);
47 | if (!appendFavorite) {
48 | return;
49 | }
50 |
51 | IPreferenceStore jdtPrefStore = PreferenceConstants.getPreferenceStore();
52 | jdtPrefStore.addPropertyChangeListener(this);
53 |
54 | Set favorites = new LinkedHashSet<>();
55 | String existingFavorites = jdtPrefStore.getString(PreferenceConstants.CODEASSIST_FAVORITE_STATIC_MEMBERS);
56 | if (!existingFavorites.isEmpty()) {
57 | favorites.addAll(Arrays.asList(existingFavorites.split(";")));
58 | }
59 |
60 | favorites.add(assertClassName + ".*");
61 |
62 | jdtPrefStore.setValue(PreferenceConstants.CODEASSIST_FAVORITE_STATIC_MEMBERS,
63 | Joiner.on(";").join(favorites));
64 | try {
65 | ((ScopedPreferenceStore) jdtPrefStore).save();
66 | } catch (IOException e) {
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/preferences/PreferenceInitializer.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.preferences;
2 |
3 | import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
4 | import org.eclipse.jface.preference.IPreferenceStore;
5 | import org.testng.eclipse.TestNGPlugin;
6 | import org.testng.eclipse.TestNGPluginConstants;
7 |
8 | /**
9 | * Class used to initialize default preference values.
10 | */
11 | public class PreferenceInitializer extends AbstractPreferenceInitializer {
12 |
13 | /*
14 | * (non-Javadoc)
15 | *
16 | * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
17 | * initializeDefaultPreferences()
18 | */
19 | @Override
20 | public void initializeDefaultPreferences() {
21 | IPreferenceStore store = TestNGPlugin.getDefault().getPreferenceStore();
22 | store.setDefault(TestNGPluginConstants.S_OUTDIR, "test-output");
23 | store.setDefault(TestNGPluginConstants.S_EXCLUDED_STACK_TRACES,
24 | "org.testng.internal org.testng.TestRunner org.testng.SuiteRunner "
25 | + "org.testng.remote.RemoteTestNG org.testng.TestNG sun.reflect java.lang");
26 | // Set the default to the original behavior, where the view takes focus when
27 | // tests finish running
28 | store.setDefault(TestNGPluginConstants.S_SHOW_VIEW_WHEN_TESTS_COMPLETE,
29 | true);
30 | store.setDefault(TestNGPluginConstants.S_SHOW_VIEW_ON_FAILURE_ONLY,
31 | false);
32 | store.setDefault(TestNGPluginConstants.S_VIEW_TITLE_SHOW_CASE_NAME,
33 | true);
34 | store.setDefault(TestNGPluginConstants.S_APPEND_FAVORITE_STATIC_IMPORT,
35 | true);
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/preferences/RunDebugPreferencePage.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.preferences;
2 |
3 | import org.eclipse.jface.preference.FieldEditorPreferencePage;
4 | import org.eclipse.jface.preference.StringFieldEditor;
5 | import org.eclipse.swt.widgets.Composite;
6 | import org.eclipse.ui.IWorkbench;
7 | import org.eclipse.ui.IWorkbenchPreferencePage;
8 | import org.testng.eclipse.TestNGPlugin;
9 | import org.testng.eclipse.TestNGPluginConstants;
10 |
11 | public class RunDebugPreferencePage extends FieldEditorPreferencePage
12 | implements IWorkbenchPreferencePage {
13 |
14 | private StringFieldEditor m_jvmArgs;
15 |
16 | public RunDebugPreferencePage() {
17 | setPreferenceStore(TestNGPlugin.getDefault().getPreferenceStore());
18 | setDescription("TestNG Run/Debug preferences");
19 | }
20 |
21 | public void init(IWorkbench workbench) {
22 | }
23 |
24 | @Override
25 | protected void createFieldEditors() {
26 | Composite parent = getFieldEditorParent();
27 | m_jvmArgs = new StringFieldEditor(TestNGPluginConstants.S_JVM_ARGS,
28 | "JVM args:",
29 | StringFieldEditor.UNLIMITED,
30 | parent);
31 | m_jvmArgs.setEmptyStringAllowed(true);
32 | m_jvmArgs.fillIntoGrid(parent, 2);
33 | addField(m_jvmArgs);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/summary/AbstractFilter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.summary;
2 |
3 | import org.eclipse.jface.viewers.ViewerFilter;
4 |
5 | abstract public class AbstractFilter extends ViewerFilter {
6 | protected String m_searchString;
7 |
8 | public void setFilter(String text) {
9 | m_searchString = ".*" + text + ".*";
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/summary/AbstractTableSorter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.summary;
2 |
3 | import org.eclipse.jface.viewers.ViewerSorter;
4 |
5 | /**
6 | * Base class sorter for the tables displayed in the SummaryTab.
7 | *
8 | * @author Cedric Beust
9 | */
10 | public class AbstractTableSorter extends ViewerSorter {
11 | private static final int DESCENDING = 1;
12 | protected int m_column;
13 | private int m_direction = 0; // start in ascending order
14 | protected SummaryTab m_tab;
15 |
16 | public AbstractTableSorter(SummaryTab tab) {
17 | m_tab = tab;
18 | }
19 |
20 | protected int adjustDirection(int result) {
21 | if (m_direction == DESCENDING) {
22 | result = -result;
23 | }
24 |
25 | return result;
26 | }
27 |
28 | public void setColumn(int column) {
29 | if (column == m_column) {
30 | // Same column as last sort; toggle the direction
31 | m_direction = 1 - m_direction;
32 | } else {
33 | // New column; do an ascending sort
34 | m_column = column;
35 | m_direction = DESCENDING;
36 | }
37 | }
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/summary/RunInfoFilter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.summary;
2 |
3 | import org.eclipse.jface.viewers.Viewer;
4 | import org.testng.eclipse.ui.RunInfo;
5 |
6 | /**
7 | * A viewer filter that uses a string to perform its filterin.
8 | *
9 | * @author C�dric Beust
10 | */
11 | public class RunInfoFilter extends AbstractFilter {
12 |
13 | @Override
14 | public boolean select(Viewer viewer, Object parentElement, Object element) {
15 | if (m_searchString == null || m_searchString.length() == 0) {
16 | return true;
17 | }
18 |
19 | RunInfo p = (RunInfo) element;
20 |
21 | return p.getTestName().toLowerCase().matches(m_searchString.toLowerCase());
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/summary/RunInfoTableSorter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.summary;
2 |
3 | import org.eclipse.jface.viewers.Viewer;
4 | import org.testng.eclipse.ui.RunInfo;
5 |
6 | /**
7 | * The sorter used for the test table.
8 | *
9 | * @author Cedric Beust
10 | */
11 | public class RunInfoTableSorter extends AbstractTableSorter {
12 |
13 | public RunInfoTableSorter(SummaryTab tab) {
14 | super(tab);
15 | }
16 |
17 | public int compare(Viewer viewer, Object e1, Object e2) {
18 | int result = 0;
19 |
20 | RunInfo r1 = (RunInfo) e1;
21 | RunInfo r2 = (RunInfo) e2;
22 | switch(m_column) {
23 | // Test name
24 | case 0 : result = r1.getTestName().compareTo(r2.getTestName()); break;
25 |
26 | // Time
27 | case 1: result = (int) (m_tab.getTestTime(r1.getTestId())
28 | - m_tab.getTestTime(r2.getTestId()));
29 | break;
30 |
31 | // Class count
32 | case 2: result = (int) (m_tab.getTestClassCount(r1.getTestId())
33 | - m_tab.getTestClassCount(r2.getTestId()));
34 | break;
35 |
36 | // Method count
37 | case 3: result = (int) (m_tab.getTestMethodCount(r1.getTestId())
38 | - m_tab.getTestMethodCount(r2.getTestId()));
39 | break;
40 | }
41 |
42 | return adjustDirection(result);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/summary/StringFilter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.summary;
2 |
3 | import org.eclipse.jface.viewers.Viewer;
4 |
5 | public class StringFilter extends AbstractFilter {
6 |
7 | @Override
8 | public boolean select(Viewer viewer, Object parentElement, Object element) {
9 | if (m_searchString == null || m_searchString.length() == 0) {
10 | return true;
11 | }
12 |
13 | String s = element.toString();
14 |
15 | return s.toLowerCase().matches(m_searchString.toLowerCase());
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/summary/StringTableSorter.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.summary;
2 |
3 | import org.eclipse.jface.viewers.Viewer;
4 |
5 | /**
6 | * The sorter used for the "excluded tests" table.
7 | *
8 | * @author Cedric Beust
9 | */
10 | public class StringTableSorter extends AbstractTableSorter {
11 |
12 | public StringTableSorter(SummaryTab tab) {
13 | super(tab);
14 | }
15 |
16 | @Override
17 | public int compare(Viewer viewer, Object e1, Object e2) {
18 | int result = e1.toString().compareTo(e2.toString());
19 |
20 | return adjustDirection(result);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/tree/BaseTestMethodTreeItem.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.tree;
2 |
3 | import java.text.MessageFormat;
4 |
5 | import org.eclipse.swt.widgets.TreeItem;
6 | import org.testng.eclipse.ui.RunInfo;
7 |
8 | /**
9 | * Base class for the tree nodes that represent a method.
10 | *
11 | * @author Cedric Beust
12 | */
13 | abstract public class BaseTestMethodTreeItem extends BaseTreeItem implements ITreeItem {
14 |
15 | private final static String FORMATTED_MESSAGE = "{0} {1} ({2,number,#.###} s)";
16 |
17 | public BaseTestMethodTreeItem(TreeItem parent, RunInfo runInfo) {
18 | super(parent, runInfo);
19 | update(runInfo);
20 | }
21 |
22 | public void update(RunInfo runInfo) {
23 | float time = getTime() / 1000;
24 |
25 | getTreeItem().setText(MessageFormat.format(FORMATTED_MESSAGE, getLabel(), "", time));
26 | maybeUpdateImage(runInfo);
27 | }
28 |
29 | protected abstract String getLabel();
30 | }
31 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/tree/BaseTreeItem.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.tree;
2 |
3 | import org.eclipse.swt.SWT;
4 | import org.eclipse.swt.widgets.Tree;
5 | import org.eclipse.swt.widgets.TreeItem;
6 | import org.testng.ITestResult;
7 | import org.testng.eclipse.ui.ImagesUtil;
8 | import org.testng.eclipse.ui.RunInfo;
9 |
10 | abstract public class BaseTreeItem implements ITreeItem {
11 | private static final String DATA_TREE_ITEM = "treeItem";
12 | private float m_time;
13 | private TreeItem m_treeItem;
14 | private RunInfo m_runInfo;
15 | private Integer m_testState = 0;
16 |
17 | public static ITreeItem getTreeItem(TreeItem ti) {
18 | return (ITreeItem) ti.getData(DATA_TREE_ITEM);
19 | }
20 |
21 | public BaseTreeItem(TreeItem parent, RunInfo runInfo) {
22 | m_treeItem = new TreeItem(parent, SWT.None);
23 | init(runInfo);
24 | }
25 |
26 | public BaseTreeItem(Tree parent, RunInfo runInfo) {
27 | m_treeItem = new TreeItem(parent, SWT.None);
28 | init(runInfo);
29 | }
30 |
31 | private void init(RunInfo runInfo) {
32 | m_runInfo = runInfo;
33 | m_treeItem.setExpanded(true);
34 | m_treeItem.setData(DATA_TREE_ITEM, this);
35 | }
36 |
37 | public void addToCumulatedTime(RunInfo runInfo) {
38 | m_time += runInfo.getTime();
39 | update(runInfo);
40 | }
41 |
42 | protected float getTime() {
43 | return m_time;
44 | }
45 |
46 | public TreeItem getTreeItem() {
47 | return m_treeItem;
48 | }
49 |
50 | public RunInfo getRunInfo() {
51 | return m_runInfo;
52 | }
53 |
54 | /**
55 | * Once a node is in failure, it needs to remain in failure, so only update it if
56 | * 1) it hasn't received an image yet or 2) it's being updated to something else
57 | * than a success.
58 | */
59 | protected void maybeUpdateImage(RunInfo runInfo) {
60 | int status = runInfo.getStatus();
61 | TreeItem treeItem = getTreeItem();
62 | if (m_testState == 0 || isNewState(status)) {
63 | treeItem.setImage(ImagesUtil.getSuiteImage(status));
64 | m_testState = status;
65 | }
66 | }
67 |
68 | /**
69 | * Only keep the most problematic state to give an accurate view to the user.
70 | *
71 | * @param state the new state to test
72 | * @return whether the passed in state will be the new state for this TreeItem.
73 | */
74 | private boolean isNewState(int state) {
75 | switch (m_testState) {
76 | case ITestResult.STARTED:
77 | return state != ITestResult.STARTED;
78 | case ITestResult.SUCCESS:
79 | return state != ITestResult.STARTED && state != ITestResult.SUCCESS;
80 | case ITestResult.SUCCESS_PERCENTAGE_FAILURE:
81 | return state == ITestResult.FAILURE || state == ITestResult.SKIP;
82 | case ITestResult.SKIP:
83 | return state == ITestResult.FAILURE;
84 | case ITestResult.FAILURE:
85 | return false;
86 | default:
87 | throw new IllegalArgumentException("Illegal state: " + state);
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/tree/ClassTreeItem.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.tree;
2 |
3 | import org.eclipse.swt.widgets.TreeItem;
4 | import org.testng.eclipse.ui.RunInfo;
5 |
6 | /**
7 | * Note that ClassTreeItems and the node classes above in the tree (TestTreeItem
8 | * and SuiteTreeItem) don't really own one RunInfo but several (one for each test
9 | * method underneath them). For this reason, the runInfo property of these items
10 | * is set to the first one they encounter, but as more updates come in, the new
11 | * RunInfo objects are passed directly to their update() method, insted of using
12 | * their own.
13 | *
14 | * @author Cedric Beust
15 | */
16 | public class ClassTreeItem extends BaseTreeItem implements ITreeItem {
17 |
18 | public ClassTreeItem(TreeItem parent, RunInfo runInfo) {
19 | super(parent, runInfo);
20 | update(runInfo);
21 | }
22 |
23 | public void update(RunInfo runInfo) {
24 | getTreeItem().setText(runInfo.getInstanceName());
25 | maybeUpdateImage(runInfo);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/tree/ITreeItem.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.tree;
2 |
3 | import org.eclipse.swt.widgets.TreeItem;
4 | import org.testng.eclipse.ui.RunInfo;
5 |
6 | /**
7 | * Every node in the tree item has an object that implements this interface attached
8 | * to it.
9 | *
10 | * @author Cedric Beust
11 | */
12 | public interface ITreeItem {
13 |
14 | void update(RunInfo runInfo);
15 |
16 | RunInfo getRunInfo();
17 |
18 | void addToCumulatedTime(RunInfo runInfo);
19 |
20 | TreeItem getTreeItem();
21 | }
22 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/tree/SuiteTreeItem.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.tree;
2 |
3 | import org.eclipse.swt.widgets.Tree;
4 | import org.testng.ITestResult;
5 | import org.testng.eclipse.ui.RunInfo;
6 |
7 | import java.text.MessageFormat;
8 |
9 | /**
10 | * A node that represents the suite (the root of the tree).
11 | *
12 | * @author Cedric Beust
13 | */
14 | public class SuiteTreeItem extends BaseTreeItem implements ITreeItem {
15 | private final static String FORMATTED_MESSAGE = "{0} ( {1}/{2}/{3}/{4} ) ({5} s)";
16 | private int m_passed;
17 | private int m_failed;
18 | private int m_skipped;
19 | private int m_percentage;
20 |
21 | public SuiteTreeItem(Tree parent, RunInfo runInfo) {
22 | super(parent, runInfo);
23 | updateView(runInfo);
24 | }
25 |
26 | public void update(RunInfo runInfo) {
27 | int status = runInfo.getStatus();
28 | if (status == ITestResult.SUCCESS) m_passed++;
29 | else if (status == ITestResult.FAILURE) m_failed++;
30 | else if (status == ITestResult.SKIP) m_skipped++;
31 | else m_percentage++;
32 | updateView(runInfo);
33 | }
34 |
35 | private void updateView(RunInfo runInfo) {
36 | getTreeItem().setText(MessageFormat.format(FORMATTED_MESSAGE,
37 | getRunInfo().getSuiteName(),
38 | new Integer(m_passed),
39 | new Integer(m_failed),
40 | new Integer(m_skipped),
41 | new Integer(m_percentage),
42 | getTime() / 1000
43 | )
44 | );
45 | maybeUpdateImage(runInfo);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/tree/TestMethodParametersTreeItem.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.tree;
2 |
3 | import org.eclipse.swt.widgets.TreeItem;
4 | import org.testng.eclipse.ui.RunInfo;
5 |
6 | /**
7 | * A tree node representing the parameters of a test method.
8 | *
9 | * @author Cedric Beust
10 | */
11 | public class TestMethodParametersTreeItem extends BaseTestMethodTreeItem {
12 |
13 | public TestMethodParametersTreeItem(TreeItem parent, RunInfo runInfo) {
14 | super(parent, runInfo);
15 | }
16 |
17 | protected String getLabel() {
18 | String result = getRunInfo().getParametersDisplay();
19 | result = result.replace("(", "");
20 | result = result.replace(")", "");
21 | return result;
22 | }
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/tree/TestMethodTreeItem.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.tree;
2 |
3 | import org.eclipse.swt.widgets.TreeItem;
4 | import org.testng.eclipse.ui.RunInfo;
5 |
6 | /**
7 | * A tree node representing a test method (only its name).
8 | *
9 | * @author Cedric Beust
10 | */
11 | public class TestMethodTreeItem extends BaseTestMethodTreeItem {
12 |
13 | public TestMethodTreeItem(TreeItem parent, RunInfo runInfo) {
14 | super(parent, runInfo);
15 | }
16 |
17 | protected String getLabel() {
18 | RunInfo runInfo = getRunInfo();
19 | String result = runInfo.getMethodName() + runInfo.getInvocationCountDisplay();
20 | return result;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/tree/TestTreeItem.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.tree;
2 |
3 | import org.eclipse.swt.widgets.TreeItem;
4 | import org.testng.eclipse.ui.RunInfo;
5 |
6 | import java.text.MessageFormat;
7 |
8 | /**
9 | * The representation in the tree of a test method.
10 | *
11 | * @author Cedric Beust
12 | */
13 | public class TestTreeItem extends BaseTreeItem implements ITreeItem {
14 | private final static String FORMATTED_MESSAGE = "{0} ( {1} s)";
15 |
16 | public TestTreeItem(TreeItem parent, RunInfo runInfo) {
17 | super(parent, runInfo);
18 | update(runInfo);
19 | }
20 |
21 | public void update(RunInfo runInfo) {
22 | getTreeItem().setText(MessageFormat.format(FORMATTED_MESSAGE,
23 | getRunInfo().getTestName(),
24 | getTime() / 1000
25 | )
26 | );
27 |
28 | maybeUpdateImage(runInfo);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/util/ProjectChooserDialog.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.util;
2 |
3 | import org.testng.eclipse.util.JDTUtil;
4 | import org.testng.eclipse.util.ResourceUtil;
5 |
6 | import org.eclipse.jdt.core.IJavaProject;
7 | import org.eclipse.jdt.ui.JavaElementLabelProvider;
8 | import org.eclipse.jface.window.Window;
9 | import org.eclipse.swt.widgets.Shell;
10 | import org.eclipse.ui.dialogs.ElementListSelectionDialog;
11 |
12 |
13 | /**
14 | * Class usage XXX
15 | *
16 | * @version $Revision$
17 | */
18 | public class ProjectChooserDialog {
19 | public static IJavaProject getSelectedProject(Shell parentShell) {
20 | ElementListSelectionDialog dialog= new ElementListSelectionDialog(
21 | parentShell,
22 | new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT)
23 | );
24 | dialog.setTitle(ResourceUtil.getString("TestNGMainTab.projectdialog.title")); //$NON-NLS-1$
25 | dialog.setMessage(ResourceUtil.getString("TestNGMainTab.projectdialog.message")); //$NON-NLS-1$
26 | dialog.setElements(JDTUtil.getJavaProjects());
27 |
28 | if(Window.OK == dialog.open()) {
29 | return (IJavaProject) dialog.getFirstResult();
30 | }
31 |
32 | return null;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/ui/util/TypeParser.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.ui.util;
2 |
3 | import org.testng.eclipse.launch.components.AnnotationVisitor;
4 | import org.testng.eclipse.launch.components.BaseVisitor;
5 | import org.testng.eclipse.launch.components.ITestContent;
6 | import org.eclipse.jdt.core.ICompilationUnit;
7 | import org.eclipse.jdt.core.IType;
8 | import org.eclipse.jdt.core.dom.AST;
9 | import org.eclipse.jdt.core.dom.ASTParser;
10 | import org.eclipse.jdt.core.dom.CompilationUnit;
11 |
12 |
13 | /**
14 | * This class parses an IType into an ITestContent
15 | *
16 | * @author cbeust
17 | */
18 | public class TypeParser {
19 |
20 | public static ITestContent parseType(IType type) {
21 | BaseVisitor result = new AnnotationVisitor();
22 | ICompilationUnit compilationUnit = type.getCompilationUnit();
23 | if (compilationUnit == null) {
24 | return result;
25 | }
26 | ASTParser parser = ASTParser.newParser(AST.JLS3);
27 | parser.setKind(ASTParser.K_COMPILATION_UNIT);
28 | parser.setResolveBindings(true);
29 | parser.setSource(compilationUnit);
30 | parser.setProject(type.getJavaProject());
31 | parser.setUnitName(compilationUnit.getPath().toString());
32 | CompilationUnit cu = (CompilationUnit) parser.createAST(null);
33 | cu.accept(result);
34 | return result;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/PixelConverter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2000, 2004 IBM Corporation and others.
3 | * All rights reserved. This program and the accompanying materials
4 | * are made available under the terms of the Common Public License v1.0
5 | * which accompanies this distribution, and is available at
6 | * http://www.eclipse.org/legal/cpl-v10.html
7 | *
8 | * Contributors:
9 | * IBM Corporation - initial API and implementation
10 | *******************************************************************************/
11 | package org.testng.eclipse.util;
12 |
13 | import org.eclipse.jface.dialogs.Dialog;
14 | import org.eclipse.swt.graphics.FontMetrics;
15 | import org.eclipse.swt.graphics.GC;
16 | import org.eclipse.swt.widgets.Control;
17 |
18 | /*
19 | * class copied from jdt ui
20 | */
21 | public class PixelConverter {
22 |
23 | private FontMetrics fFontMetrics;
24 |
25 | public PixelConverter(Control control) {
26 | GC gc = new GC(control);
27 | gc.setFont(control.getFont());
28 | fFontMetrics= gc.getFontMetrics();
29 | gc.dispose();
30 | }
31 |
32 | /**
33 | * @see org.eclipse.jface.dialogs.DialogPage#convertHeightInCharsToPixels(int)
34 | */
35 | public int convertHeightInCharsToPixels(int chars) {
36 | return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars);
37 | }
38 |
39 | /**
40 | * @see org.eclipse.jface.dialogs.DialogPage#convertHorizontalDLUsToPixels(int)
41 | */
42 | public int convertHorizontalDLUsToPixels(int dlus) {
43 | return Dialog.convertHorizontalDLUsToPixels(fFontMetrics, dlus);
44 | }
45 |
46 | /**
47 | * @see org.eclipse.jface.dialogs.DialogPage#convertVerticalDLUsToPixels(int)
48 | */
49 | public int convertVerticalDLUsToPixels(int dlus) {
50 | return Dialog.convertVerticalDLUsToPixels(fFontMetrics, dlus);
51 | }
52 |
53 | /**
54 | * @see org.eclipse.jface.dialogs.DialogPage#convertWidthInCharsToPixels(int)
55 | */
56 | public int convertWidthInCharsToPixels(int chars) {
57 | return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/ReporterListenerContributor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.util;
2 |
3 | import org.testng.IReporter;
4 |
5 | public abstract class ReporterListenerContributor implements IReporter
6 | {
7 | }
8 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/ResourceUtil.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.util;
2 |
3 |
4 | import java.text.MessageFormat;
5 | import java.util.MissingResourceException;
6 | import java.util.ResourceBundle;
7 |
8 | public class ResourceUtil {
9 | private static final String BUNDLE_NAME= "org.testng.eclipse.TestNGMessages"; //$NON-NLS-1$
10 |
11 | private static final ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME);
12 |
13 | private ResourceUtil() {
14 | }
15 |
16 | /**
17 | * Gets a string from the resource bundle and formats it with the argument
18 | *
19 | * @param key the string used to get the bundle value, must not be null
20 | */
21 | public static String getFormattedString(String key, Object arg) {
22 | return MessageFormat.format(getString(key), new Object[] { arg });
23 | }
24 |
25 | /**
26 | * Gets a string from the resource bundle and formats it with arguments
27 | */
28 | public static String getFormattedString(String key, Object[] args) {
29 | return MessageFormat.format(getString(key), args);
30 | }
31 |
32 | public static String getString(String key) {
33 | try {
34 | return RESOURCE_BUNDLE.getString(key);
35 | } catch (MissingResourceException e) {
36 | return '!' + key + '!'; //$NON-NLS-1$ //$NON-NLS-2$
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/StringUtils.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.util;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Collection;
5 | import java.util.List;
6 |
7 | import com.google.common.base.Joiner;
8 |
9 | public class StringUtils {
10 |
11 | public static List stringToList(String s) {
12 | List result = new ArrayList<>();
13 |
14 | if(null != s){
15 | String[] a = s.split("[,]+");
16 | for(int i = 0; i < a.length; i++) {
17 | if(a[i].trim().length() > 0) {
18 | result.add(a[i]);
19 | }
20 | }
21 | }
22 | return result;
23 | }
24 |
25 | /**
26 | * Splits a comma separated string into token and returns null if the string
27 | * is empty.
28 | */
29 | public static List stringToNullList(final String s) {
30 | List result = stringToList(s);
31 |
32 | return result.isEmpty() ? null : result;
33 | }
34 |
35 | public static boolean isEmptyString(String content) {
36 | return null == content || content.trim().length() == 0;
37 | }
38 |
39 | public static String listToString(Collection l) {
40 | if (l != null && !l.isEmpty()) {
41 | return Joiner.on(',').join(l).trim();
42 | }
43 | return "";
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/SuiteGenerator.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.util;
2 |
3 | import org.testng.reporters.XMLStringBuffer;
4 | import org.testng.xml.LaunchSuite;
5 |
6 | import java.io.File;
7 | import java.util.List;
8 | import java.util.Map;
9 | import java.util.Properties;
10 |
11 | /**
12 | * Factory to create custom suites.
13 | *
14 | * @author Hani Suleiman
15 | */
16 | public class SuiteGenerator {
17 | public static LaunchSuite createProxiedXmlSuite(final File xmlSuitePath) {
18 | return new LaunchSuite.ExistingSuite(xmlSuitePath);
19 | }
20 |
21 | public static LaunchSuite createCustomizedSuite(String projectName,
22 | List packageNames, List classNames, Map> methodNames,
23 | List groupNames, Map parameters,
24 | int logLevel, String workingDir) {
25 |
26 | if((null != groupNames) && !groupNames.isEmpty()) {
27 | return new GroupListSuite(projectName, packageNames, classNames, groupNames, parameters,
28 | logLevel, workingDir);
29 | }
30 | else if(null != packageNames && !packageNames.isEmpty()) {
31 | return new PackageSuite(projectName, packageNames, parameters, logLevel, workingDir);
32 | }
33 | else {
34 | return new ClassMethodsSuite(projectName, classNames, methodNames, parameters,
35 | logLevel, workingDir);
36 | }
37 | }
38 |
39 | public static String createSingleClassSuite(String className) {
40 | XMLStringBuffer xsb = new XMLStringBuffer();
41 | Properties p = new Properties();
42 | p.put("name", "Suite");
43 | p.put("parallel", "false");
44 | xsb.push("suite", p);
45 |
46 | p = new Properties();
47 | p.put("name", "Test");
48 | xsb.push("test", p);
49 | xsb.push("classes");
50 | p = new Properties();
51 | p.put("name", className);
52 | xsb.addEmptyElement("class", p);
53 | xsb.pop("classes");
54 | xsb.pop("test");
55 | xsb.pop("suite");
56 |
57 | return xsb.toXML();
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/TestListenerContributor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.util;
2 |
3 | import org.testng.TestListenerAdapter;
4 |
5 | public abstract class TestListenerContributor extends TestListenerAdapter
6 | {
7 | }
8 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/TypeAndMethod.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.util;
2 |
3 | import java.util.Objects;
4 |
5 | import org.eclipse.jdt.core.IMethod;
6 | import org.eclipse.jdt.core.IType;
7 |
8 | public class TypeAndMethod {
9 |
10 | private final IType type;
11 | private final IMethod method;
12 |
13 | public TypeAndMethod(IType type, IMethod method) {
14 | this.type = type;
15 | this.method = method;
16 | }
17 |
18 | public IType getType() {
19 | return type;
20 | }
21 |
22 | public IMethod getMethod() {
23 | return method;
24 | }
25 |
26 | @Override
27 | public boolean equals(Object obj) {
28 | if (!(obj instanceof TypeAndMethod)) {
29 | return false;
30 | }
31 | TypeAndMethod o = (TypeAndMethod) obj;
32 | return Objects.equals(type, o.type) && Objects.equals(method, o.method);
33 | }
34 |
35 | @Override
36 | public int hashCode() {
37 | return Objects.hash(type, method);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/signature/IMethodDescriptor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.util.signature;
2 |
3 |
4 | public interface IMethodDescriptor {
5 | public String getName();
6 | public String getReturnTypeSignature();
7 | public String getSignature();
8 | public String getFullSignature();
9 | public int getParameterCount();
10 | public String getAnnotationType();
11 | }
12 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/eclipse/util/signature/MethodDescriptor.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.util.signature;
2 |
3 | import org.eclipse.jdt.core.IMethod;
4 | import org.eclipse.jdt.core.JavaModelException;
5 |
6 |
7 | public class MethodDescriptor implements IMethodDescriptor {
8 | private IMethod m_method;
9 |
10 | public MethodDescriptor(IMethod method) {
11 | m_method = method;
12 | }
13 |
14 | public String getName() {
15 | return m_method.getElementName();
16 | }
17 |
18 | public String getReturnTypeSignature() {
19 | try {
20 | return m_method.getReturnType();
21 | }
22 | catch(JavaModelException jme) {
23 | ;
24 | }
25 |
26 | return "";
27 | }
28 |
29 | public String getSignature() {
30 | try {
31 | return m_method.getSignature();
32 | }
33 | catch(JavaModelException jme) {
34 | ;
35 | }
36 |
37 | return "";
38 | }
39 |
40 | public String getFullSignature() {
41 | return getName() + getSignature();
42 | }
43 |
44 | public int getParameterCount() {
45 | return m_method.getNumberOfParameters();
46 | }
47 |
48 |
49 | public String getAnnotationType() {
50 | return "";
51 | }
52 |
53 | /**
54 | * Override hashCode.
55 | *
56 | * @return the Objects hashcode.
57 | */
58 | public int hashCode() {
59 | int hashCode = 1;
60 | hashCode = 31 * hashCode + getFullSignature().hashCode();
61 |
62 | return hashCode;
63 | }
64 |
65 | /**
66 | * Returns true
if this MethodDescriptor
is the same as the o argument.
67 | *
68 | * @return true
if this MethodDescriptor
is the same as the o argument.
69 | */
70 | public boolean equals(Object o) {
71 | if(this == o) {
72 | return true;
73 | }
74 | if (o == null || !(o instanceof IMethodDescriptor)) {
75 | return false;
76 | }
77 |
78 | IMethodDescriptor castedObj = (IMethodDescriptor) o;
79 | return getFullSignature().equals(castedObj.getFullSignature());
80 | }
81 |
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/org/testng/xml/SuiteGenerator.java:
--------------------------------------------------------------------------------
1 | // migrated from testng core, see https://github.com/testng-team/testng-eclipse/issues/562
2 | package org.testng.xml;
3 |
4 | import java.io.File;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import java.util.Map;
8 |
9 | /**
10 | * Factory to create custom suites.
11 | *
12 | * @author Hani Suleiman Date: Jul 25, 2005 Time: 1:12:18 PM
13 | */
14 | public class SuiteGenerator {
15 | private static final Collection EMPTY_CLASS_LIST = Collections.emptyList();
16 |
17 | public static LaunchSuite createProxiedXmlSuite(final File xmlSuitePath) {
18 | return new LaunchSuite.ExistingSuite(xmlSuitePath);
19 | }
20 |
21 | public static LaunchSuite createSuite(
22 | String projectName,
23 | Collection packageNames,
24 | Map> classAndMethodNames,
25 | Collection groupNames,
26 | Map parameters,
27 | String annotationType,
28 | int logLevel) {
29 |
30 | LaunchSuite result;
31 | Collection classes =
32 | classAndMethodNames != null ? classAndMethodNames.keySet() : EMPTY_CLASS_LIST;
33 | if ((null != groupNames) && !groupNames.isEmpty()) {
34 | //
35 | // Create a suite from groups
36 | //
37 | result =
38 | new LaunchSuite.ClassListSuite(
39 | projectName, packageNames, classes, groupNames, parameters, annotationType, logLevel);
40 | } else if (packageNames != null && !packageNames.isEmpty()) {
41 | //
42 | // Create a suite from packages
43 | //
44 | result =
45 | new LaunchSuite.ClassListSuite(
46 | projectName, packageNames, classes, groupNames, parameters, annotationType, logLevel);
47 | } else {
48 | //
49 | // Default suite creation
50 | //
51 | result =
52 | new LaunchSuite.ClassesAndMethodsSuite(
53 | projectName, classAndMethodNames, parameters, annotationType, logLevel);
54 | }
55 |
56 | return result;
57 | }
58 | }
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/main/resources/git.properties:
--------------------------------------------------------------------------------
1 | git.branch=${git.branch}
2 | git.commit.id=${git.commit.id}
3 | git.build.version=${git.build.version}
4 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/test/java/org/testng/eclipse/convert/DoublesPair.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.convert;
2 |
3 | public class DoublesPair {
4 |
5 | public DoublesPair(double d, double e) {
6 | }
7 |
8 | public static DoublesPair of(double d, double e) {
9 | return null;
10 | }
11 |
12 | public static DoublesPair of(DoublesPair base) {
13 | return null;
14 | }
15 |
16 | public static DoublesPair ofNumbers(Pair base) {
17 | return null;
18 | }
19 |
20 | public static DoublesPair ofNumbers(DoublesPair base) {
21 | // TODO Auto-generated method stub
22 | return null;
23 | }
24 |
25 | public Object getFirst() {
26 | return null;
27 | }
28 |
29 | public Object getSecond() {
30 | return null;
31 | }
32 |
33 | public double getFirstDouble() {
34 | // TODO Auto-generated method stub
35 | return 0;
36 | }
37 |
38 | public double getSecondDouble() {
39 | // TODO Auto-generated method stub
40 | return 0;
41 | }
42 |
43 | public Object getKey() {
44 | return null;
45 | }
46 |
47 | public Object getValue() {
48 | return null;
49 | }
50 |
51 | public double getDoubleKey() {
52 | // TODO Auto-generated method stub
53 | return 0;
54 | }
55 |
56 | public double getDoubleValue() {
57 | // TODO Auto-generated method stub
58 | return 0;
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/test/java/org/testng/eclipse/convert/JUnit3NoConversionTest1.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.convert;
2 |
3 | import junit.framework.TestCase;
4 |
5 | /**
6 | * This class should not be converted (no test, setUp, tearDown method).
7 | *
8 | * @author Cedric Beust
9 | *
10 | */
11 | public class JUnit3NoConversionTest1 extends TestCase {
12 |
13 | public void f() {
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/test/java/org/testng/eclipse/convert/JUnit3NoConversionTest2.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.convert;
2 |
3 | import junit.framework.TestCase;
4 |
5 | /**
6 | * This class should not be converted (extends TestSuite).
7 | *
8 | * @author Cedric Beust
9 | */
10 | public class JUnit3NoConversionTest2 extends TestCase {
11 |
12 | public void f() {
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/test/java/org/testng/eclipse/convert/JUnit3Test1.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.convert;
2 |
3 |
4 | import java.text.ParseException;
5 | import java.text.SimpleDateFormat;
6 | import java.util.Date;
7 |
8 | import junit.framework.Assert;
9 | import junit.framework.Test;
10 | import junit.framework.TestCase;
11 | import junit.framework.TestSuite;
12 |
13 | public class JUnit3Test1 extends TestCase {
14 | private QueueTracker _queueTracker;
15 |
16 | @Override
17 | public void setUp() throws Exception {
18 | super.setUp();
19 | assertEquals("ErrorRate is incorrect", 0.0, 1.0);
20 | assertNull(null);
21 | }
22 |
23 | @Override
24 | public void tearDown() throws Exception {
25 | super.tearDown();
26 | }
27 |
28 | public void _test3Underscore() {
29 | fail("Should be a disabled test");
30 | }
31 |
32 | private void test3Private() {
33 | fail("Should be a disabled test");
34 | }
35 |
36 | public void testExecute() {
37 | assertEquals("CurrentEnqueueCountTotal is incorrect", 1,
38 | _queueTracker.getCurrentEnqueueCountTotal());
39 | assertEquals("CurrentQueueSize is incorrect", 1,
40 | _queueTracker.getCurrentQueueSize());
41 | assertTrue("run() should have been called", _queueTracker.isRun());
42 | assertEquals("CurrentQueueSize is incorrect after run()", 0,
43 | _queueTracker.getCurrentQueueSize());
44 |
45 | String DATE_FORMAT = "dd.MM.yyyy HH:mm:ss SSS";
46 | String DATE_STRING = "12.12.2112 12:12:12 122";
47 | SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
48 | Date date;
49 | try {
50 | date = dateFormat.parse(DATE_STRING);
51 | assertEquals("12.12.2112 00:00:00 000", dateFormat.format(null));
52 | assertEquals(dateFormat.parse(DATE_STRING), date);
53 | } catch (ParseException e) {
54 | // TODO Auto-generated catch block
55 | e.printStackTrace();
56 | }
57 | }
58 |
59 | public static Test suite() {
60 | return new TestSuite();
61 | }
62 |
63 | public void test1() {
64 | Assert.assertEquals(true, true);
65 | System.out.println("Worked");
66 | assertNull(null);
67 | assertNotNull(new Object());
68 | }
69 |
70 | public void test2() {
71 | fail("Not implemented");
72 | }
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/test/java/org/testng/eclipse/convert/JUnit3Test2.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.convert;
2 |
3 | import junit.framework.Assert;
4 |
5 | public class JUnit3Test2 extends MyTestCase {
6 | public JUnit3Test2(String name) {
7 | super(name);
8 | }
9 |
10 | public void test1() {
11 | Assert.fail("should fail");
12 | assert_notification_that(1, 2);
13 | Assert.assertEquals(true, true);
14 | assertMyStuff(null);
15 | Assert.assertEquals("This is", "123","123");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/test/java/org/testng/eclipse/convert/JUnit3Test3.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.convert;
2 |
3 | import junit.framework.TestCase;
4 |
5 | public class JUnit3Test3 extends TestCase {
6 |
7 | public JUnit3Test3(String name) {
8 | // Should be removed
9 | super(name);
10 | }
11 |
12 | protected void setUp() throws Exception {
13 | // Should be removed
14 | super.setUp();
15 | }
16 |
17 | public void _testFoo() {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/test/java/org/testng/eclipse/convert/JUnit3Test4.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.convert;
2 |
3 |
4 | public class JUnit3Test4 extends MyTestCase {
5 |
6 | public JUnit3Test4(String name) {
7 | // Should not be removed
8 | super(name);
9 | }
10 |
11 | protected void setUp() throws Exception {
12 | // Should not be removed
13 | super.setUp();
14 | }
15 |
16 | public void _testFoo() {
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/testng-eclipse-plugin/src/test/java/org/testng/eclipse/convert/JUnit4ParameterizedTest.java:
--------------------------------------------------------------------------------
1 | package org.testng.eclipse.convert;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.junit.runners.Parameterized;
6 | import org.junit.runners.Parameterized.Parameters;
7 |
8 | import java.util.Arrays;
9 | import java.util.Collection;
10 |
11 | // Should be removed
12 | @RunWith(Parameterized.class)
13 | public class JUnit4ParameterizedTest {
14 |
15 | private int number;
16 |
17 | public JUnit4ParameterizedTest(int number) {
18 | this.number = number;
19 | }
20 |
21 | @Parameters
22 | public static Collection