{"id":30294491,"url":"https://github.com/linkedin/dex-test-parser","last_synced_at":"2025-08-17T01:35:18.968Z","repository":{"id":17159523,"uuid":"77101659","full_name":"linkedin/dex-test-parser","owner":"linkedin","description":"Find all test methods in an Android instrumentation APK","archived":false,"fork":false,"pushed_at":"2023-11-26T10:53:47.000Z","size":701,"stargazers_count":104,"open_issues_count":2,"forks_count":30,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-04-13T23:22:24.143Z","etag":null,"topics":["android","android-library","dex","linkedin","test-framework","testing"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linkedin.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}},"created_at":"2016-12-22T02:05:46.000Z","updated_at":"2024-03-10T06:06:37.000Z","dependencies_parsed_at":"2022-08-07T08:15:48.621Z","dependency_job_id":null,"html_url":"https://github.com/linkedin/dex-test-parser","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/linkedin/dex-test-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fdex-test-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fdex-test-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fdex-test-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fdex-test-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkedin","download_url":"https://codeload.github.com/linkedin/dex-test-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkedin%2Fdex-test-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270796216,"owners_count":24647319,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","android-library","dex","linkedin","test-framework","testing"],"created_at":"2025-08-17T01:35:14.224Z","updated_at":"2025-08-17T01:35:18.933Z","avatar_url":"https://github.com/linkedin.png","language":"Kotlin","readme":"# Dex Test Parser\n[![Build Status](https://img.shields.io/github/workflow/status/linkedin/dex-test-parser/Merge%20checks)](https://img.shields.io/github/workflow/status/linkedin/dex-test-parser/Merge%20checks)\n\n## Motivation\n\ndex-test-parser was inspired by the Google presentation \"[Going Green: Cleaning up the Toxic Mobile Environment](https://www.youtube.com/watch?v=aHcmsK9jfGU)\".\n\n## What does it do?\n\nGiven an Android instrumentation apk, dex-test-parser will parse the apk's dex files and return the fully qualified method names of all JUnit 3 and JUnit 4 test methods.\n\nOf course, you could also collect this list of method names from inside your test code by scanning the apk internally and using reflection. However, there are several reasons you may not want to do this:\n\n * Scanning the app's classpath for test methods at runtime causes any static initializers in the classes to be run immediately, which can lead to tests that behave differently than production code.\n * You might want to run one invocation of the `adb shell am instrument` command for each test to avoid shared state between tests and so that if one test crashes, other tests are still run.\n\n## Download\n\nDownload the latest .jar via Maven:\n```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.linkedin.dextestparser\u003c/groupId\u003e\n      \u003cartifactId\u003eparser\u003c/artifactId\u003e\n      \u003cversion\u003e2.3.4\u003c/version\u003e\n      \u003ctype\u003epom\u003c/type\u003e\n    \u003c/dependency\u003e\n```\n\nor Gradle:\n```\n    compile 'com.linkedin.dextestparser:parser:2.3.4'\n```\n\nor you can manually download the jar from [Bintray](https://bintray.com/linkedin/maven/parser).\n\n## Getting Started\n\ndex-test-parser provides a single public method that you can call from Java to get all test method names.\n```java\nList\u003cString\u003e customAnnotations = new ArrayList\u003c\u003e();\nList\u003cString\u003e testMethodNames = DexParser.findTestNames(apkPath, customAnnotations);\n```\nVariable customAnnotations is a list of custom tags that marks tests if you are using custom test runner for your tests.\n\nYou can also use the jar directly from the command line if you prefer. This will create a file called `AllTests.txt` in the specified output directory.\n\n```\n\njava -jar parser.jar path/to/apk path/for/output\n\n```\nIf \"path/for/output\" is omitted, the output will be printed into stdout.\n\n\nIf you have custom test runner (com.company.testing.uitest.screenshot.ScreenshotTest in this example) and custom tag to annotate tests:\n```\n\njava -jar parser.jar path/to/apk path/for/output -A com.company.testing.uitest.screenshot.ScreenshotTest\n\n```\n\n## Snapshots\n\nYou can use snapshot builds to test the latest unreleased changes. A new snapshot is published\nafter every merge to the main branch by the [Deploy Snapshot Github Action workflow](.github/workflows/deploy-snapshot.yml).\n\nJust add the Sonatype snapshot repository to your Gradle scripts:\n```gradle\nrepositories {\n    maven {\n        url \"https://oss.sonatype.org/content/repositories/snapshots/\"\n    }\n}\n```\n\nYou can find the latest snapshot version to use in the [gradle.properties](gradle.properties) file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkedin%2Fdex-test-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkedin%2Fdex-test-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkedin%2Fdex-test-parser/lists"}