Giter Club home page Giter Club logo

shaker-artifacts-icsme's Introduction

Shaker

SHAKER is a lightweight approach to detect flakiness in time-constrained tests by adding noise in the execution environment.

How to cite Shaker

@inproceedings{STA:ICSME2020,
	author = {Silva, Denini and Teixeira, Leopoldo and d'Amorim, Marcelo},
	booktitle={2020 IEEE International Conference on Software Maintenance and Evolution (ICSME)},
	title = {{Shake It! Detecting Flaky Tests Caused by Concurrency with Shaker}},
	year = {2020},
	pages={301-311},
	doi={10.1109/ICSME46990.2020.00037}
}

Organization

This repository is organized in the following structure:

  • the dataset folder contains the set of flaky tests we used in the paper;
  • the raw_results folder contains the raw data produced from the evaluation we performed;
  • the evaluation folder contains the toolset developed for running Shaker against the apps listed below and producing the raw data described above.
  • the standalone folder contains the instructions for running Shaker in other apps.

Setup Instructions

The minimum requirements for running the tools and scripts we developed for this work are described below. These steps were executed and tested using a fresh install of the Ubuntu 18.04 LTS environment. The approach relies on running an emulator, and some steps might take long to execute, although we paremeterize our scripts so it is not necessary to run the exact number of replications we executed for each experiment in the paper (see the evaluation folder).

The step by step instructions follow below, but these are all automated under the setup.sh script.

Install Linux packages

sudo apt-get update 
sudo apt-get install -y openjdk-8-jdk stress-ng python3-pip unzip r-base

Install required Python libraries:

We assume a working Python3 environment. We require installing the following libraries for executing the Minimal Hitting-Set (MHS) algorithm.

pip3 install python-sat
pip3 install numpy==1.16.1

Install Android Command Line tools

wget https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
unzip commandlinetools-linux-6609375_latest.zip
rm -f commandlinetools-linux-6609375_latest.zip
mkdir cmdline-tools
mv tools/ cmdline-tools
mkdir Android
mv cmdline-tools/ Android

Configure the Android SDK version and AVD from the command line (Android API version 28)

yes | $HOME/Android/cmdline-tools/tools/bin/sdkmanager --licenses
$HOME/Android/cmdline-tools/tools/bin/sdkmanager "platforms;android-28"
$HOME/Android/cmdline-tools/tools/bin/sdkmanager "system-images;android-28;default;x86"
$HOME/Android/cmdline-tools/tools/bin/sdkmanager "build-tools;28.0.3" 

If you want to use another API version, such as 23, just change the numbers in platforms and system-images:

$HOME/Android/cmdline-tools/tools/bin/sdkmanager "platforms;android-28"
$HOME/Android/cmdline-tools/tools/bin/sdkmanager "system-images;android-28;default;x86"

Create AVD device (Android API version 28):

echo no | $HOME/Android/cmdline-tools/tools/bin/avdmanager create avd --name EmuAPI28 --package "system-images;android-28;default;x86"

If you want to use another API version, such as 23, just change the corresponding numbers:

echo no | $HOME/Android/cmdline-tools/tools/bin/avdmanager create avd --name EmuAPI23 --package "system-images;android-23;default;x86"

Run the emulator

To run the emulator created by the setup.sh script, just execute:

./runemulator.sh

This will run the DEFAULT_EMULATOR defined in the runemulator.sh. If you want to run a particular emulator that you have previously created, with a different name, change the variable inside the script or provide the name as the first argument:

./runemulator.sh AVD_NAME

Finally, if you want to run in headless mode (-no-window), you might execute the following script that runs the default emulator:

./runemulator-nogui.sh

Again, if you want to run a particular emulator that you have previously created, with a different name, change the variable inside the script or provide it as the first argument:

./runemulator-nogui.sh AVD_NAME

After finishing booting the emulator for the first time (wait for the boot complete message in the console), the apps we have used for the evaluation can be installed using the install-apps.sh script.

Executing Shaker

This is all it takes for configuring the environment for running Shaker by using the predefined scripts for each research question from the paper, which are available at the evaluation folder. You can also run the icsme2020-eval.sh or quick-eval.sh to go through all RQs.

Apps used as Objects of Analyses

Name SHA
AntennaPod dd5234c
AnyMemo 7e674fb
Espresso 043d028
Flexbox-layout 611c755
FirefoxLite 048d605
Kiss 00011ce
Omni-Notes b7f9396
Orgzly d74235e
Paintroid 1f302a2
Susi 17a7031
WiFiAnalyzer 80e0b5d

Issues opened

For each project where we found flaky tests, we opened issues:

shaker-artifacts-icsme's People

Contributors

damorim avatar denini08 avatar leopoldomt avatar shaker-project avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

yue-cheng-wind

shaker-artifacts-icsme's Issues

testing mentions inside code

this is just to test whether adding a mention to a user inside code will result in an email sent to said user.

@damorim
@denini08
@shaker-project
@leopoldomt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.