{"id":25776908,"url":"https://github.com/TestingResearchIllinois/NonDex","last_synced_at":"2025-02-27T06:07:01.443Z","repository":{"id":8640021,"uuid":"56729247","full_name":"TestingResearchIllinois/NonDex","owner":"TestingResearchIllinois","description":"A tool for finding assumptions on APIs with under-determined specifications.","archived":false,"fork":false,"pushed_at":"2024-10-22T05:01:30.000Z","size":1083,"stargazers_count":43,"open_issues_count":28,"forks_count":34,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-23T05:47:19.102Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TestingResearchIllinois.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2016-04-21T00:13:36.000Z","updated_at":"2024-10-22T03:48:48.000Z","dependencies_parsed_at":"2022-08-07T04:16:42.566Z","dependency_job_id":"bf510ce1-bb8d-4789-9b3b-c907613158ac","html_url":"https://github.com/TestingResearchIllinois/NonDex","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestingResearchIllinois%2FNonDex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestingResearchIllinois%2FNonDex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestingResearchIllinois%2FNonDex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TestingResearchIllinois%2FNonDex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TestingResearchIllinois","download_url":"https://codeload.github.com/TestingResearchIllinois/NonDex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240987435,"owners_count":19889335,"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":[],"created_at":"2025-02-27T06:01:32.979Z","updated_at":"2025-02-27T06:07:01.435Z","avatar_url":"https://github.com/TestingResearchIllinois.png","language":"Java","readme":"# NonDex\n\n[![Build Status](https://travis-ci.org/TestingResearchIllinois/NonDex.svg?branch=master)](https://travis-ci.org/TestingResearchIllinois/NonDex)\n[![Build status](https://ci.appveyor.com/api/projects/status/7cw58oph5346xvm0/branch/master?svg=true)](https://ci.appveyor.com/project/alexgyori/nondex/branch/master)\n[![Issue Count](https://codeclimate.com/github/TestingResearchIllinois/NonDex/badges/issue_count.svg)](https://codeclimate.com/github/TestingResearchIllinois/NonDex)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4ef0b45fa77a4d58af5e23917c9bf5ae)](https://www.codacy.com/app/gyori/NonDex?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=TestingResearchIllinois/NonDex\u0026amp;utm_campaign=Badge_Grade)\n\nNonDex is a tool for detecting and debugging wrong assumptions on under-determined Java APIs. An\nexample of such an assumption is when code assumes the order of iteration\nthrough the entries in a `java.util.HashMap` is deterministic\n, while the [specification](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html) for `java.util.HashMap` states that its\niteration order is not guaranteed to be in any particular order. Such\nassumptions can hurt portability for an application when they are moved to\nother environments with a different Java runtime. NonDex explores different behaviors of \nunder-determined APIs and reports test failures under different explored behaviors; \nNonDex only explores behaviors that are allowed by the specification, so tests that fail or flake under NonDex instrumentation likely indicate false assumptions on a deterministic implementation of an under-determined Java API. NonDex helps expose such \"implementation-dependent\" flaky tests to the developers early, so they can fix the assumptions before they\nbecome actual bugs in the future and/or even propagate to other projects.\n\nSupported APIs:\n===============\nThe list of supported APIs can be found [here](https://github.com/TestingResearchIllinois/NonDex/wiki/Supported-APIs)\n\nPrerequisites:\n==============\n    - Java 8 ~ 17 (Oracle JDK, OpenJDK).\n    - Maven 3.6+ and Surefire present in the POM.(for the NonDex Maven plugin).\n    - Gradle 5.0+ (for the NonDex Gradle plugin).\n\n\nBuild (Maven):\n======\n\n    mvn install\n\nBuild (Gradle):\n======\n\n    cd nondex-gradle-plugin\n    ./gradlew build\n\nUse (Maven - Command-line):\n============\n\nTo find if you have flaky tests under NonDex shuffling, run (use the ``-Dtest=...`` filter for individual tests):\n\n    mvn edu.illinois:nondex-maven-plugin:2.1.7:nondex\n\nTo debug, run:\n\n    mvn edu.illinois:nondex-maven-plugin:2.1.7:debug\n    \nThe NonDex Maven plugin also offers additional options; to see them all, run:\n\n    mvn edu.illinois:nondex-maven-plugin:2.1.7:help\n\n \nUse (Maven - Add Plugin):\n============ \nAdd the NonDex plugin to the plugins section under the build section in your `pom.xml`:\n\n```xml\n\u003cproject\u003e\n  ...\n  \u003cbuild\u003e\n    ...\n    \u003cplugins\u003e\n      ...\n      \u003cplugin\u003e\n        \u003cgroupId\u003eedu.illinois\u003c/groupId\u003e\n        \u003cartifactId\u003enondex-maven-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e2.1.7\u003c/version\u003e\n      \u003c/plugin\u003e\n    \u003c/plugins\u003e\n  \u003c/build\u003e\n\u003c/project\u003e\n```\n\nTo find if you have flaky tests, run:\n\n    mvn nondex:nondex\n\nTo debug, run:\n\n    mvn nondex:debug\n    \nThe NonDex Maven plugin also offers additional options; to see them all, run:\n\n    mvn nondex:help\n\n\nUse (Gradle):\n============\n\nTo use NonDex in Gradle (Groovy), add the following content into your `build.gradle`:\n\n```groovy\nplugins {\n  id 'edu.illinois.nondex' version '2.1.7'\n}\n```\nApply it to subprojects (if any, optional):\n```\nsubprojects {\n  apply plugin: 'edu.illinois.nondex'\n}\n```\n\nTo use NonDex in Gradle (Kotlin), add the following content into your `build.gradle.kts`:\n```kotlin\nplugins {\n  id(\"edu.illinois.nondex\") version \"2.1.7\"\n}\n```\nApply it to subjects (if any, optional):\n```\nsubprojects {\n  apply(plugin = \"edu.illinois.nondex\")\n}\n```\n\nAlternatively, if you are on Linux or MacOS, can use the existing script to set up NonDex in gradle build files automatically:\n```\ncd modify-gradle-build\n./add-nondex.sh ${path to the root directory of the project to run NonDex in}\n```\n\nTo find if you have flaky tests, run (use the ``--tests`` filter for individual tests):\n\n    ./gradlew nondexTest\n\nTo debug, run:\n\n    ./gradlew nondexDebug\n\nTo get the help information of NonDex Gradle plugin, run:\n\n    ./gradlew nondexHelp\n\n\nUse (Command-line):\n===================\n\nAfter installing, if your application uses the same Java version as you use to build NonDex, run:\n\n    root=\u003cpath to NonDex root\u003e\n    instrumentedjar=${root}/nondex-instrumentation/resources/out.jar\n    # Use the instrumented jar to run your application\n    commonjar=${root}/nondex-common/target/nondex-common-2.1.7.jar\n    java -Xbootclasspath/p:${instrumentedjar}:${commonjar} \u003capplication\u003e\n\nOptionally, in case your application needs a different Java version than the one you use to build NonDex, after installing, run:\n\n    root=\u003cpath to NonDex root\u003e\n    instrumentingjar=${root}/nondex-instrumentation/target/nondex-instrumentation-2.1.7.jar\n    instrumentedjar=${root}/\u003cunique name of the output jar, such as out.jar\u003e\n    java -jar ${instrumentingjar} \u003cpath to rt.jar\u003e ${instrumentedjar}\n    # Use the instrumented jar to run your application\n    commonjar=${root}/nondex-common/target/nondex-common-2.1.7.jar\n    java -Xbootclasspath/p:${instrumentedjar}:${commonjar} \u003capplication\u003e\n\nOutput:\n=======\n\nIf there are flaky tests (passes in the run without NonDex shuffling but fails in one of the NonDex-shuffled runs), the output will report them under the section marked `\"NonDex SUMMARY:\"`.\n\nThe flaky tests are also logged in files called \"failure\" in the `.nondex/`\ndirectory.  Each execution is identified by an execution ID (also reported in\nthe Maven output) and an execution that has a \"failure\" file in the `.nondex/ directory` with the same name as the execution ID.\n\nOutput (Debug):\n===============\n\nAfter running the debug task, the Maven output reports for each flaky test both the\ncommand-line arguments to pass in to reproduce the failure and the path to the\nfile containing the debug results for the flaky test. These files are named\n\"debug\", and they contain the name of the debugged test and the stack trace for\nthe single invocation point that when run through NonDex leads to the test\nfailing. If the test cannot be debugged to this single point, the debugger will report that the cause cannot be reproduced and may be\nflaky due to other reasons.\n","funding_links":[],"categories":["测试"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTestingResearchIllinois%2FNonDex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTestingResearchIllinois%2FNonDex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTestingResearchIllinois%2FNonDex/lists"}