{"id":15173951,"url":"https://github.com/redhat-developer/intellij-common-ui-test-library","last_synced_at":"2025-10-26T06:31:07.887Z","repository":{"id":37604881,"uuid":"369167491","full_name":"redhat-developer/intellij-common-ui-test-library","owner":"redhat-developer","description":"IntelliJ IDEA UI test library is a tool for creating automated UI tests for IntelliJ IDEA plugin projects.","archived":false,"fork":false,"pushed_at":"2025-01-31T15:34:05.000Z","size":515,"stargazers_count":11,"open_issues_count":24,"forks_count":10,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-01-31T16:12:16.881Z","etag":null,"topics":["gradle","integration-test","integration-testing","intellij","intellij-idea","java","jetbrains","ui-testing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-developer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-20T10:22:11.000Z","updated_at":"2025-01-31T15:22:34.000Z","dependencies_parsed_at":"2023-01-17T15:46:02.410Z","dependency_job_id":"5ace59b1-1102-461d-9c04-b995bdd77117","html_url":"https://github.com/redhat-developer/intellij-common-ui-test-library","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-common-ui-test-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-common-ui-test-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-common-ui-test-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-developer%2Fintellij-common-ui-test-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-developer","download_url":"https://codeload.github.com/redhat-developer/intellij-common-ui-test-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238276073,"owners_count":19445344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gradle","integration-test","integration-testing","intellij","intellij-idea","java","jetbrains","ui-testing"],"created_at":"2024-09-27T11:05:18.075Z","updated_at":"2025-10-26T06:31:07.882Z","avatar_url":"https://github.com/redhat-developer.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Welcome to the IntelliJ IDEA UI test library project! Here you'll find several pieces of information and advices on how to set up, use and contribute to this library.\n\n## Purpose of this project\nThis project allows you to create automated UI tests for your IntelliJ IDEA plugin project. Using this library you are able to access UI elements such as buttons, inputs, tree elements etc. and perform actions with them. Navigating through wizards, clicking on buttons or editing file content of newly created project could be automated using this library.\n\n## Any Suggestions or Questions?\nPlease submit an [issue](https://github.com/redhat-developer/intellij-common-ui-test-library/issues) to this project.\n\n## Contributing\nFeel free to contribute to this project! See the [contribution guide](https://github.com/redhat-developer/intellij-common-ui-test-library/blob/main/CONTRIBUTING.md) for more details.\n\n## Quick setup\nThe setup of this library is easy - just extend the **build.gradle.kts** file as described in the following steps, and you are ready to write your first UI test.\n\n### STEP #1: Adding repositories\nYou need to add the following nexus and JetBrains repositories:\n```\nrepositories {\n    maven {\n        url 'https://raw.githubusercontent.com/redhat-developer/intellij-common-ui-test-library/repository/'\n    }\n    maven {\n        url 'https://packages.jetbrains.team/maven/p/ij/intellij-dependencies'\n    }\n}\n```\n\n### STEP #2: Adding dependencies\nAdd the following dependency:\n```\ndependencies {\n    compile 'com.redhat.devtools.intellij:intellij-common-ui-test-library:0.4.4'\n}\n```\n\n### STEP #3: Adding source sets\nThe following source set is needed to define where in your project will be your UI tests and resources located. The following example displays the 'src/it/java' location for java code of UI tests and the 'src/it/resources' location for resources:\n```\nsourceSets {\n    integrationTest {\n        java.srcDir file('src/it/java')\n        resources.srcDir file('src/it/resources')\n        compileClasspath += sourceSets.main.get().compileClasspath + sourceSets.test.get().compileClasspath\n        runtimeClasspath += output + compileClasspath + sourceSets.test.get().runtimeClasspath\n    }\n}\n```\n\n### STEP #4: Adding tasks\n```\ntask integrationTest(type: Test) {\n    useJUnitPlatform()\n    description = 'Runs the integration tests.'\n    group = 'verification'\n    testClassesDirs = sourceSets.integrationTest.output.classesDirs\n    classpath = sourceSets.integrationTest.runtimeClasspath\n    outputs.upToDateWhen { false }\n    mustRunAfter test\n}\n\nrunIdeForUiTests {\n    systemProperty \"robot-server.port\", System.getProperty(\"robot-server.port\")\n}\n```\n## Additional Features\n\n### Creating a Project\n\n**Creating an Empty Project:**\nUse the following method to create an empty project with a specified name:\n\n```java\nCreateCloseUtils.createEmptyProject(remoteRobot, \"empty-test-project\");\n```\n**Creating a New Project with a Specific Type:**\nYou can also create a new project with a specific type, such as Java, Maven, or Gradle:\n```java\nCreateCloseUtils.createNewProject(remoteRobot, \"new-test-project\", CreateCloseUtils.NewProjectType.PLAIN_JAVA);\n```\n### Test project location\nDefault test project location is `/home/user/IdeaProjects/intellij-ui-test-projects/`.\nDevelopers can specify the location where the test project will be created by providing a system property called `testProjectLocation`. For example:\n```\ntask integrationTest(type: Test) {\n    ...\n    systemProperties['testProjectLocation'] = '/home/user/IdeaProjects/intellij-ui-test-projects/'\n    ...\n}\n```\nOr add the location as a parameter for gradlew command which runs the test. For example:\n```\nsystemProperties['testProjectLocation'] = project.hasProperty('testProjectLocation') ? project.property('testProjectLocation') : null\n    \n./gradlew integrationTest -PtestProjectLocation=${env.HOME}/IdeaProjects/intellij-ui-test-projects/\n```\n\n### Remote-robot IntelliJ instance logs\nIf developers want to view the remote-robot intellij instance logs, they can specify system property intellij_debug to save these logs to files, which will be stored inside $user.dir/intellij_debug folder.\n```\ntask integrationTest(type: Test) {\n    ...\n    systemProperties['intellij_debug'] = 'true'\n    ...\n}\n```\n\n## Start and quit IntelliJ IDEA\nUse the following code to start IntelliJ before running the first UI test. The runIde() method not only starts the IDE for UI tests, it also returns reference to the Remote-Robot instance which will be useful later to access UI elements such as buttons, inputs etc.\n```\nprivate static RemoteRobot robot;\n\n@BeforeAll\npublic static void runIdeForUiTests() {\n    robot = UITestRunner.runIde(UITestRunner.IdeaVersion.COMMUNITY_V_2022_2, 8580);\n}\n```\n\nAfter executing all the UI tests close the IDE by running the following command:\n```\n@AfterAll\npublic static void closeIde() {\n    UITestRunner.closeIde();\n}\n```\n\n## What next? Implement your first UI test!\nAfter you manage to set up this library to your project and successfully start and quit IntelliJ IDEA, there is no more setup needed. Just start writing your UI tests! Here are some examples that will help you get started:\n\n### Create your first fixture\nCreate an instance of a FlatWelcomeFrame class which allows you to access the 'Welcome to IntelliJ IDEA' dialog's UI.\n```\nFlatWelcomeFrame flatWelcomeFrame = remoteRobot.find(FlatWelcomeFrame.class, Duration.ofSeconds(10));\n```\n\n### Use the fixture to access UI\nAfter you have the object, it can be used to access the UI - here is an example of clicking on the 'New Project' button:\n```\nflatWelcomeFrame.createNewProject();\n```\n\n### Use utilities\nThis library provides several static utility methods for common actions. Here is an example of one useful transformation method:\n```\nString contentListStr = TextUtils.listOfRemoteTextToString(contentList);\n```\n\n### Use any tool provided by Remote-Robot framework\nBesides the fixtures and utilities provided by this library you can use any tool from the [Remote-Robot](https://github.com/JetBrains/intellij-ui-test-robot) framework itself. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer%2Fintellij-common-ui-test-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-developer%2Fintellij-common-ui-test-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-developer%2Fintellij-common-ui-test-library/lists"}