Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Commit

Permalink
Add a download page to the website, move test plan to the website. Si…
Browse files Browse the repository at this point in the history
…mplify intro page a bit.
  • Loading branch information
mikehearn committed Dec 30, 2018
1 parent c3595d8 commit 6558791
Show file tree
Hide file tree
Showing 4 changed files with 162 additions and 111 deletions.
89 changes: 0 additions & 89 deletions TESTS.md

This file was deleted.

52 changes: 52 additions & 0 deletions website/source/_static/download.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<html>
<head>
<title>Downloading Graviton ...</title>
</head>
<body>
<script>
var OSName = "Unknown OS";
if (navigator.appVersion.indexOf("Win")!==-1)
OSName = "Windows";
else if (navigator.appVersion.indexOf("Mac")!==-1)
OSName = "macOS";
else if (navigator.appVersion.indexOf("Linux") !==-1 )
OSName = "Linux";
else if (navigator.appVersion.indexOf("X11") !==-1 )
OSName = "UNIX";

function osToURL(osname) {
var url;
switch (osname) {
case "Windows":
url = "https://update.graviton.app/win/Graviton.exe";
break;
case "macOS":
url = "https://update.graviton.app/Graviton.dmg";
break;
case "Linux":
case "UNIX":
url = "https://update.graviton.app/graviton.tar.gz"
}
return url;
}
</script>

<font face="sans-serif">
<center>
<p>
<font size="xx-large"><script>document.write(OSName)</script> download should start automatically ...</font><p>

Download for
<script>document.write("<a href=\"" + osToURL("Windows") + "\">Windows</a>");</script> |
<script>document.write("<a href=\"" + osToURL("macOS") + "\">macOS</a>");</script> |
<script>document.write("<a href=\"" + osToURL("Linux") + "\">Linux</a>");</script>

</center>
</font>

<script>
//window.location = osToURL(OSName);
</script>

</body>
</html>
44 changes: 23 additions & 21 deletions website/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,51 +1,53 @@
Graviton
########

Graviton is a *prototype* app browser and cross-platform software manager.
Graviton is an app browser and cross-platform software manager.

.. raw:: html

<center><a href="_static/download.html"><button class="button button2">Download now</button></a></center><br><br>

.. raw:: html

<center>
<iframe width="700" height="393" src="https://www.youtube.com/embed/cyBN_ILkAtg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</center><br>


It gives you:

* A **browser-like shell** that downloads and runs desktop apps, written in languages that can run on the JVM.
* **Silent upgrades** via a regular scheduled background task, like in Chrome. Apps, dependencies, the JVM and
Graviton itself are all upgraded regularly, whether or not the user is currently running an app.
* First class support for **cross platform command line apps**. They also smoothly upgrade, even if the app is running at the time (good for servers). Graviton enables colour terminal handling on Windows 10, so ANSI escapes can be used on any platform with confidence.
* **Publish software simply** using GitHub, GitLab or BitBucket releases! The repository is cloned on a remote server
in a sandbox, compiled, packaged, downloaded and this process repeats in the background on regular intervals to keep
your app up to date. Push new versions to your users by simply making a new GitHub release.
* **Silent upgrades** via a regular scheduled background task, like in Chrome. Apps, dependencies, the JVM and
Graviton itself are all upgraded regularly, whether or not the user is currently running an app.
* **Apps can be written in any language** with a JVM backend, such as Java, `JavaScript <https://www.youtube.com/watch?v=OUo3BFMwQFo>`_, Python, Scala, Kotlin, `Haskell <https://eta-lang.org/>`_, `Ruby <https://github.com/oracle/truffleruby>`_, with support for sandboxed C, C++ and Rust coming in future via Sulong.
* First class support for **cross platform command line apps**. They also smoothly upgrade, even if the app is running at the time (good for servers). Graviton enables colour terminal handling on Windows 10, so ANSI escapes can be used on any platform with confidence.
* **Detection of proxy settings** from the OS or browsers, and can handle proxy auto-config files. Apps automatically benefit.
* Use advanced designed-for-apps GUI toolkits like JavaFX with visual designers, or embed WebKit and use HTML.

Learn more by reading the :doc:`introduction`.

Current status
**************

The project is alpha software and could benefit from your help. We are currently preparing for our first distributed
binaries, which we hope to reach by the end of the year. `See remaining tasks <https://github.com/mikehearn/graviton-browser/projects/1>`_.
Get involved
************

You can talk to us on the `graviton-dev mailing list <https://groups.google.com/forum/#!forum/graviton-dev>`_ or in
`the #graviton-browser channel on the Kotlin Slack <https://surveys.jetbrains.com/s3/kotlin-slack-sign-up>`_.
The project is alpha software and could benefit from your help.

**UI**. There is a simple UI that lets you start apps by entering Maven coordinates. The dependencies
are downloaded in parallel and then the main class is executed. You can omit the version number and the latest version
will be used. Packages are cached locally and can run offline. After first run, app startup is always immediate.
* Talk to us on the `graviton-dev mailing list <https://groups.google.com/forum/#!forum/graviton-dev>`_
* Or on `the #graviton-browser channel on the Kotlin Slack <https://surveys.jetbrains.com/s3/kotlin-slack-sign-up>`_.
* Or on `our GitHub repository <https://github.com/graviton-browser/graviton-browser>`_.

**Online update**. Graviton updates both itself and the last 20 recently used apps in the background, silently, whether or
not Graviton itself is running. It uses a Chrome-style approach in which the OS native task scheduler is used to invoke
Graviton invisibly in the background. Therefore apps run via Graviton can assume the JRE is always up to date (we currently
run on Java 8, but will upgrade to Java 11 in future), and that they are also up to date.
Graviton needs you! We're looking for people with:

**Command line**. There is a ``graviton`` command line tool that lets you run apps by coordinate.
* Web design skills, to make a nicer site for the project (these pages would remain as developer docs).
* Evangelism skills, to find projects that can run on the JVM and convince them to use Graviton as a distribution mechanism.
* Developer skills:
* Journeyman level, `to create a beautiful showcase for both GUI and CLI apps <https://github.com/graviton-browser/graviton-browser/issues/79>`_. This would be a good student project.
* Intermediate level, `to improve the start page shell GUI <https://github.com/graviton-browser/graviton-browser/issues?q=is%3Aissue+is%3Aopen+label%3Ashell>`_.
* Expert level, to work on improved app streaming formats, JVM isolation, OpenGL, network discovery, OS integration tasks and more. See the :doc:`roadmap` for ideas.

**Cross platform**. It all runs on Windows, Mac and Linux. On Windows 10, command line apps benefit from support for colour
terminal output.
**Commercial version?** Would you like a Pro/Enterprise level version of Graviton? `Let me know! <https://docs.google.com/forms/d/e/1FAIpQLSdl-5xSHdspPLWjMRBjqiCEPlzDsr4CNHoNRarp9nGC6UY5JA/viewform?usp=sf_link>`_

.. toctree::
:maxdepth: 2
Expand Down
88 changes: 87 additions & 1 deletion website/source/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,90 @@ Finally, use ``curl -d '{}' http://localhost:8080/__admin/recordings/stop`` to s
The directory you ran WireMock in will now have two directories, files and mappings. Any binary larger than 1kb will
have been put in the files directory, textual responses or small binary responses will be in JSON files in mappings.
If you re-run the same Graviton command against the WireMock server, all the answers will come from the recording.
You can test this by disabling your wifi or ethernet connection.
You can test this by disabling your wifi or ethernet connection.

Test plans
==========

This document contains some manual test plans. At some point we should automate them, although
testing software like Graviton can be tricky. We'll need to use an HTTP server that can
replay recorded interactions with real Maven repositories, and use lots of TestFX for the GUI,
mock filesystems and so on. Then integration tests for the OS integrations/background updates.

Pre-flight checklist
--------------------

Build the package for each OS in turn. Ensure there are no Graviton cache directories anywhere and remove them if so.
Install the package.

Mac installer
~~~~~~~~~~~~~

- Make sure your Mac security settings are configured to be the default, i.e. Gatekeeper is active.
- Ensure there are no Graviton installs or data directories already.
- Open the mac DMG and drag it to the Applications folder. Ensure the icon and DMG background look right.
- Start the app from the Applications folder and ensure it starts, that the menu bar shows the name Graviton.

Windows installer
~~~~~~~~~~~~~~~~~

- Click the Windows installer. Ensure it installs automatically and with no user interaction.
- Find the app in the start menu and start it. Shut it down.
- Open task scheduler and check the background update task is registered. Run it manually and check that in the log
that the update process ran up to the point that it knows it's up to date.
- Go into the control panel and uninstall Graviton. Ensure the uninstall completes without errors
(this is a common failure point!)

CLI
~~~

- Run ``graviton --help`` and ensure a useful help output is created. On Windows, ensure it's in colour.
- Run ``graviton --version`` and ensure the version number is correct.
- Run ``graviton com.github.ricksbrown:cowsay --cowthink moo!`` and ensure it downloads and runs correctly.
- Run it again and ensure there's no download or other UI text this time, just the cow.
- Go offline (disable wifi) and run ``graviton --clear-cache com.github.ricksbrown:cowsay "cannot work"``. Check
the error message you get is sensible and helpful.
- Run ``graviton --clear-cache com.github.ricksbrown:cowsay "Downloaded again!"`` and ensure it re-downloads and runs like before.
- Run ``graviton -r com.github.ricksbrown:cowsay moo`` and ensure it checks for an update again.
- Edit the history file to set the time of the last update to more than 24 hours ago. Then run
``graviton --offline com.github.ricksbrown:cowsay moo`` and ensure it doesn't check for an update even though
the history entry is old.

GUI shell
~~~~~~~~~

- Start the GUI. Run Tic-Tac-Toe and ensure it downloads properly, the main window disappears, TTT starts. Quit and ensure GUI is restored.
- Ensure the history list populates with an app tile for it.
- Start ``com.github.rohitawate:everest`` and click cancel during the download. Make sure it stops.
- Start Everest again, this time, quit during the download and ensure Graviton properly quits.
- Start it for a third time and this time let it succeed.
- Right click on one of the tiles and ensure each item works.

Online update
~~~~~~~~~~~~~

- Clear your cache. Start ``net.plan99:tictactoe:1.0.1`` - it should download an old version of the app. Now go into
your history file and edit it so the version number is missing from the coordinate fragment field.
This makes it look like the user just hasn't updated for a while and a new version has been released.
- Start Graviton GUI. Now from the command line run ``graviton --background-update`` and check the log file to ensure
it updated you to the latest version of tictactoe. Start the app in the GUI ensure it's now the latest version.

**If the bootstrapper, installers, packaging or runtime update code was changed, for each platform**:

- Bump the version number and prepare an update site that has the dummy update
- Install the current (under test) version
- Leave the machine or VM until an update check interval has passed, with Graviton running
- Make sure that the update has been downloaded, applied and restarting Graviton makes it appear

Next steps to improve testing
=============================

1. Implement or find a recording HTTP proxy that can simulate errors and slowness. WireMock isn't quite there for us,
I could never make its browser proxy mode really work. Make recordings of installing various apps. The manual
test cases should now be executable entirely offline.
2. Write an integration test tool that verifies, given a random/clean cache directory:
* the CLI tool can be used to install and run basic programs
* when run against the proxy recordings
3. Write a basic TestFX test that generates a clean cache directory and installs/runs TicTacToe from the
proxy recordings.
4. Extend the test to ensure that the clear cache function works.

0 comments on commit 6558791

Please sign in to comment.