forked from hunterno4/spoon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76a895c
commit b34bbbc
Showing
10 changed files
with
338 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
DIR=temp-clone | ||
|
||
# Delete any existing temporary website clone | ||
rm -rf $DIR | ||
|
||
# Clone the current repo into temp folder | ||
git clone [email protected]:square/spoon.git $DIR | ||
|
||
# Move working directory into temp folder | ||
cd $DIR | ||
|
||
# Checkout and track the gh-pages branch | ||
git checkout -t origin/gh-pages | ||
|
||
# Delete everything | ||
rm -rf * | ||
|
||
# Copy website files from real repo | ||
cp -R ../website/* . | ||
|
||
# Stage all files in git and create a commit | ||
git add . | ||
git add -u | ||
git commit -m "Website at $(date)" | ||
|
||
# Push the new files up to GitHub | ||
git push origin gh-pages | ||
|
||
# Delete our temp folder | ||
cd .. | ||
rm -rf $DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Spoon — Command line utility which aids in the deployment, execution, and aggregation of instrumentation tests across multiple devices.</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="description" content="Command line utility which aids in the deployment, execution, and aggregation of instrumentation tests across multiple devices."> | ||
<link href="http://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" rel="stylesheet" title="roboto"> | ||
<link href="static/bootstrap.min.css" rel="stylesheet"> | ||
<link href="static/bootstrap-responsive.min.css" rel="stylesheet"> | ||
<link href="static/prettify.css" rel="stylesheet"> | ||
<link href="static/app.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="span4 side"> | ||
<h1>Spoon</h1> | ||
<h2>Command line utility which aids in the deployment, execution, and aggregation of instrumentation tests across multiple devices.</h2> | ||
<p><a href="https://squareup.com/"><img src="static/square.png" alt="by Square, Inc."></a></p> | ||
</div> | ||
<div class="offset4 span8 main"> | ||
<div class="main-inner"> | ||
<h3 id="introduction">Introduction</h3> | ||
<p>Android's ever-expanding ecosystem of devices creates a unique challenge to testing applications. Spoon aims to simplify this task by distributing instrumentation test execution and displaying the results in a meaningful way.</p> | ||
|
||
<h3 id="usage">Usage</h3> | ||
<p>Instrumentation tests blah blah blah...</p> | ||
|
||
<h4 id="screenshots">Screenshots</h4> | ||
<p>In addition to simply running instrumentation tests, Spoon has the ability to snap screenshots at key points during your tests which are then included in the output. This allows for visual inspection of test executions across different devices.</p> | ||
<p>Taking screenshots requires that you include the <code>spoon-screenshot</code> JAR in your instrumentation app. In your tests call the <code>snap</code> method with a human-readable tag.</p> | ||
<pre class="prettyprint">Screenshot.snap(activity, "initial_state"); | ||
/* Normal test code... */ | ||
Screenshot.snap(activity, "after_login");</pre> | ||
<p>The tag specified will be used to identify and compare screenshots taken across multiple test runs.</p> | ||
<p>Screenshots are displayed in order for each test in the output:</p> | ||
<img src="..." alt="Sample output with screenshots"> | ||
<p>You can also view each test's screenshots as an animated GIF to guage the actual sequence of interaction.</p> | ||
|
||
<h3 id="execution">Execution</h3> | ||
<p>Spoon was designed to be run both as a standalone tool or directly as part of your build system.</p> | ||
|
||
<h4 id="cli">Command Line</h4> | ||
<p>You can run Spoon as a standalone tool with your application and instrumentation APKs.</p> | ||
<pre>java -jar spoon-1.0.0-jar-with-dependencies.jar \ | ||
--apk example-app.apk \ | ||
--test-apk example-tests.apk</pre> | ||
<p>You can control additional parameters of the execution using other flags.</p> | ||
<pre>Options: | ||
--apk Application APK | ||
--output Output path | ||
--sdk Path to Android SDK | ||
--test-apk Test application APK | ||
--title Execution title</pre> | ||
|
||
<h4 id="maven">Maven</h4> | ||
<p>If you are using Maven for compilation, a plugin is provided for easy execution. Declare the plugin in the <code>pom.xml</code> for the instrumentation test module.</p> | ||
<pre class="prettyprint"><plugin> | ||
<groupId>com.squareup.spoon</groupId> | ||
<artifactId>spoon-maven-plugin</artifactId> | ||
<version><em class="version">(insert latest version)</em></version> | ||
<executions> | ||
<execution> | ||
<phase>integration-test</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin></pre> | ||
<p>The plugin will look for an <code>apk</code> dependency for the corresponding application. Typically this is specified in parallel with the <code>jar</code> dependency on the application.</p> | ||
<pre class="prettyprint"><dependency> | ||
<groupId>com.example</groupId> | ||
<artifactId>example-app</artifactId> | ||
<version>${project.version}</version> | ||
<type>jar</type> | ||
<scope>provied</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.example</groupId> | ||
<artifactId>example-app</artifactId> | ||
<version>${project.version}</version> | ||
<type>apk</type> | ||
<scope>provied</scope> | ||
</dependency></pre> | ||
<p>The plugin will now run automatically when running phases such as <code>verify</code> or you can invoke it directly by running <code>mvn spoon:run</code>. The execution result will be placed in the <code>target/spoon-output/</code> folder.</p> | ||
<p>For a working example see the sample application and instrumentation tests in the <code>sample/</code> folder.</p> | ||
|
||
<h3 id="download">Download</h3> | ||
<p>...</p> | ||
|
||
<h3 id="example">Sample Output</h3> | ||
<p>...</p> | ||
|
||
<h3 id="contributing">Contributing</h3> | ||
<p>If you would like to contribute code to Spoon you can do so through GitHub by forking the repository and sending a pull request.</p> | ||
<p>When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also make sure your code compiles by running <code>mvn clean verify</code>. Checkstyle failures during compilation indicate errors in your style and can be viewed in the <code>checkstyle-result.xml</code> file.</p> | ||
<p>Before your code can be accepted into the project you must also sign the <a href="https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1">Individual Contributor License Agreement (CLA)</a>.</p> | ||
|
||
<h3 id="license">License</h3> | ||
<pre class="license">Copyright 2012 Square, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License.</pre> | ||
|
||
<a id="ribbon" href="https://github.com/square/spoon"><img src="static/ribbon.png" alt="Fork me on GitHub"></a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="static/prettify.js"></script> | ||
<script> prettyPrint();</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
body { | ||
background: #ffffff url('bedge_grunge.png') fixed repeat; | ||
margin-top: 40px; | ||
color: #222; | ||
font: 14px/19px Roboto, sans-serif; | ||
font-weight: 400; | ||
letter-spacing: .1 | ||
} | ||
|
||
code, pre { | ||
color: #444; | ||
background: none; | ||
border: none; | ||
} | ||
pre { | ||
font-size: 11px; | ||
} | ||
code { | ||
white-space: nowrap; | ||
} | ||
|
||
.side h1 { | ||
font-size: 100px; | ||
line-height: 110px; | ||
font-weight: 200; | ||
margin-bottom: 30px; | ||
} | ||
.side h2 { | ||
font-size: 18px; | ||
line-height: 25px; | ||
font-weight: 300; | ||
margin-bottom: 60px; | ||
} | ||
|
||
.main { | ||
padding-top: 40px; | ||
padding-bottom: 40px; | ||
} | ||
.main h3 { | ||
padding-top: 40px; | ||
margin-top: 0; | ||
margin-bottom: 10px; | ||
font-weight: 200; | ||
font-size: 20px; | ||
} | ||
.main h4 { | ||
padding-top: 20px; | ||
margin-top: 0; | ||
margin-bottom: 8px; | ||
text-transform: uppercase; | ||
font-weight: 300; | ||
font-size: 13px; | ||
line-height: 14px; | ||
color: #555; | ||
} | ||
.main h4:first-child, .main h3:first-child { | ||
padding-top: 0; | ||
} | ||
.main h5 { | ||
font-size: 12px; | ||
margin-top: 14px; | ||
margin-bottom: 4px; | ||
text-transform: uppercase; | ||
} | ||
|
||
#ribbon img { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
border: 0; | ||
} | ||
|
||
a:link, a:visited, a:active, a:hover { | ||
color: #4183C4; | ||
} | ||
a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
@media(min-width:768px) { | ||
body { | ||
margin-top: 60px; | ||
} | ||
.side { | ||
text-align: right; | ||
position: fixed; | ||
} | ||
.side ul { | ||
margin-bottom: 60px; | ||
} | ||
.main { | ||
padding-top: 28px; | ||
padding-bottom: 100px; | ||
} | ||
.main-inner { | ||
margin-left: 25px; | ||
} | ||
|
||
#ribbon img { | ||
position: fixed; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.com { color: #93a1a1; } | ||
.lit { color: #195f91; } | ||
.pun, .opn, .clo { color: #93a1a1; } | ||
.fun { color: #dc322f; } | ||
.str, .atv { color: #866; } | ||
.kwd, .linenums, .tag { color: #1e347b; } | ||
.typ, .atn, .dec, .var { color: teal; } | ||
.pln { color: #48484c; } | ||
|
||
.prettyprint { | ||
padding: 8px; | ||
background-color: rgba(255, 255, 255, 0.3); | ||
} | ||
.prettyprint.linenums { | ||
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; | ||
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; | ||
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; | ||
} | ||
|
||
/* Specify class=linenums on a pre to get line numbering */ | ||
ol.linenums { | ||
margin: 0 0 0 33px; /* IE indents via margin-left */ | ||
} | ||
ol.linenums li { | ||
padding-left: 12px; | ||
color: #bebec5; | ||
line-height: 18px; | ||
text-shadow: 0 1px 0 #fff; | ||
} |
Oops, something went wrong.