All Projects → linkedin → Dex Test Parser

linkedin / Dex Test Parser

Licence: bsd-2-clause
Find all test methods in an Android instrumentation APK

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Dex Test Parser

Redasm
The OpenSource Disassembler
Stars: ✭ 1,042 (+1097.7%)
Mutual labels:  dex
Waykichain
Public Blockchain as a Decentralized Finance Infrastructure Service Platform
Stars: ✭ 1,117 (+1183.91%)
Mutual labels:  dex
Tcunit
An unit testing framework for Beckhoff's TwinCAT 3
Stars: ✭ 74 (-14.94%)
Mutual labels:  test-framework
Linkedin Bot
JS script for automatic invitations to add to the network of contacts
Stars: ✭ 52 (-40.23%)
Mutual labels:  linkedin
Mobidex
Mobile trustless trading through Uniswap
Stars: ✭ 61 (-29.89%)
Mutual labels:  dex
Qtools
QTools collection of open source tools for embedded systems development on Windows, Linux and MacOS
Stars: ✭ 64 (-26.44%)
Mutual labels:  test-framework
Linkedin Pdf Parsing
Parsing resumes in a PDF format from linkedIn
Stars: ✭ 46 (-47.13%)
Mutual labels:  linkedin
Social Login Helper Deprecated
A simple android library to easily implement social login into your android project
Stars: ✭ 81 (-6.9%)
Mutual labels:  linkedin
Simplesmali
通过精简Smali语法细节来增强反编译代码阅读性,自定义了一种简单语法
Stars: ✭ 61 (-29.89%)
Mutual labels:  dex
Poco
A cross-engine test automation framework based on UI inspection
Stars: ✭ 1,177 (+1252.87%)
Mutual labels:  test-framework
Data Mocks
Library to mock local data requests using Fetch or XHR
Stars: ✭ 55 (-36.78%)
Mutual labels:  test-framework
Bitshares Core
BitShares Blockchain implementation and command-line interface
Stars: ✭ 1,096 (+1159.77%)
Mutual labels:  dex
Linkedingiveaway
👨🏽‍🏫You can learn about anything over here. What Giveaways I do and why it's important in today's modern world. Are you interested in Giveaway's?🔋
Stars: ✭ 67 (-22.99%)
Mutual labels:  linkedin
Keyring
Keyring is an authentication framework for WordPress. It comes with definitions for a variety of HTTP Basic, OAuth1 and OAuth2 web services. Use it as a common foundation for working with other web services from within WordPress code.
Stars: ✭ 52 (-40.23%)
Mutual labels:  linkedin
Nimoy
A testing and specification framework for Python 3
Stars: ✭ 76 (-12.64%)
Mutual labels:  test-framework
Hellomello
Experiments with writing Android apps in Nim
Stars: ✭ 47 (-45.98%)
Mutual labels:  dex
Dexbox
A lightweight dex file parsing library
Stars: ✭ 64 (-26.44%)
Mutual labels:  dex
Testcafe
A Node.js tool to automate end-to-end web testing.
Stars: ✭ 9,176 (+10447.13%)
Mutual labels:  test-framework
Httpmock
HTTP mocking library for Rust.
Stars: ✭ 76 (-12.64%)
Mutual labels:  test-framework
Electron
This is the repository for my course, Electron: Building Cross Platform Desktop Apps on LinkedIn Learning and Lynda.com.
Stars: ✭ 69 (-20.69%)
Mutual labels:  linkedin

Dex Test Parser

Build Status

Motivation

dex-test-parser was inspired by the Google presentation "Going Green: Cleaning up the Toxic Mobile Environment".

What does it do?

Given 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.

Of 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:

  • 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.
  • 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.

Download

Download the latest .jar via Maven:

    <dependency>
      <groupId>com.linkedin.dextestparser</groupId>
      <artifactId>parser</artifactId>
      <version>2.3.1</version>
      <type>pom</type>
    </dependency>

or Gradle:

    compile 'com.linkedin.dextestparser:parser:2.3.1'

or you can manually download the jar from Bintray.

Getting Started

dex-test-parser provides a single public method that you can call from Java to get all test method names.

List<String> customAnnotations = new ArrayList<>();
List<String> testMethodNames = DexParser.findTestNames(apkPath, customAnnotations);

Variable customAnnotations is a list of custom tags that marks tests if you are using custom test runner for your tests.

You 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.


java -jar parser.jar path/to/apk path/for/output

If "path/for/output" is omitted, the output will be printed into stdout.

If you have custom test runner (com.company.testing.uitest.screenshot.ScreenshotTest in this example) and custom tag to annotate tests:


java -jar parser.jar path/to/apk path/for/output -A com.company.testing.uitest.screenshot.ScreenshotTest

Snapshots

You can use snapshot builds to test the latest unreleased changes. A new snapshot is published after every merge to the main branch by the Deploy Snapshot Github Action workflow.

Just add the Sonatype snapshot repository to your Gradle scripts:

repositories {
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots/"
    }
}

You can find the latest snapshot version to use in the gradle.properties file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].