GithubHelp home page GithubHelp logo

web5design / gaia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozilla-b2g/gaia

0.0 2.0 0.0 892.57 MB

Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see https://wiki.mozilla.org/Release_Management/B2G_Landing

Home Page: https://wiki.mozilla.org/B2G

License: Other

gaia's Introduction

Gaia Build Status

Gaia is Mozilla's Phone UX for the Boot to Gecko (B2G) project.

Boot to Gecko aims to create a complete, standalone operating system for the open web.

You can read more about B2G here:

http://mozilla.org/b2g

follow us on twitter: @Boot2Gecko

http://twitter.com/Boot2Gecko

join the Gaia mailing list:

http://groups.google.com/group/mozilla.dev.gaia

and talk to us on IRC:

#gaia on irc.mozilla.org

Hacking Gaia

The Gaia/Hacking page on MDN has all the information that you need to start working on Gaia, including building and running Gaia on a compatible device or desktop computer.

Shepherd (bot)

Opt-into new features by adding +shepherd to your first commit.

Features available:

  • automatic github -> bugzilla linking

Tests

Unit Tests

Unit tests for an app go in apps/<APP>/test/unit/.

To run all the unit tests with B2G Desktop:

  1. Run DEBUG=1 make

  2. Run make test-agent-server &

  3. Run B2G Desktop and open the Test Agent app

  4. Run make test-agent-test

    or make test-agent-test APP=<APP> to run unit tests for a specific app

More importantly, you can use test-agent-server to watch the files on the filesystem and execute relevant tests when they change:

  1. Run DEBUG=1 make
  2. Run make test-agent-server &
  3. Run B2G Desktop and open the Test Agent app
  4. Edit files and when you save them, glance at the console with test-agent-server running

Note: If you add new files, you will need to restart test-agent-server.

As a convenience, you can also use the gaia-test script to launch the test-agent-server and open the Test Agent app in firefox:

  1. Add firefox to your $PATH or set $FIREFOX to your preferred firefox/aurora/nightly binary.
  2. Run ./bin/gaia-test to run the test-agent-server and launch firefox.
  3. Run make test-agent-test or modify files as described above.

For more details on writing tests, see: https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko/Gaia_Unit_Tests

Integration Tests

Gaia uses marionette-js-runner to run the tests with a custom builder for gaia. Tests should live with the rest of your apps code (in apps/my_app/test/marionette) and test files should end in _test.js.

All integration tests run under a node environment. You need node >= 0.10 for this to work predictably.

Shared code for tests lives under shared/test/integration.

Invoking a test

make test-integration TEST_FILES=<test>

For example, we could run the day_view_test.js test in calendar app with the below command.

make test-integration TEST_FILES=./apps/calendar/test/marionette/day_view_test.js

If you would like to run more than one test, we could do the below command.

make test-integration TEST_FILES="./apps/calendar/test/marionette/day_view_test.js ./apps/calendar/test/marionette/today_test.js"

Invoking tests for a specific app

make test-integration APP=<APP>

For example, we could run all tests for the calendar app with make test-integration APP=calendar.

Invoking all the tests

NOTE: unless you tests end in _test.js they will not be automatically picked up by make test-integration.

make test-integration

Running tests while working

If you wish to run many tests in background you might not want to be disturbed by the b2g-desktop window popping everytime, or the sound. One solution for the first issue is to use Xvfb:

xvfb-run make test-integration

If you are using PulseAudio and want to keep the tests quied, then just force an invalid server:

PULSE_SERVER=":" make test-integration

You can of course combine both:

PULSE_SERVER=":" xvfb-run make test-integration

Where to find documentation

Gotchas

  • For performance reasons we don't run make profile for each test run this means you need to manually remove the profile-test folder when you make changes to your apps.

  • If you don't have a b2g folder one will be downloaded for you. This can be problematic if you're offline. You can symlink a b2g-desktop directory to b2g/ in gaia to avoid the download.

  • If you have some weird node errors, try removing node_modules since things may be stale.

  • To get debug information from the b2g desktop client, run this: DEBUG=b2g-desktop ./bin/gaia-marionette name/of/test.js

  • To get debug information from b2g desktop and all of the marionette plugins, run this: DEBUG=* ./bin/gaia-marionette name/of/test.js

UI Tests

Functional

See Gaia functional tests README

Endurance

See how to run the Gaia endurance tests

Generate jsdoc

To generate API reference locally, you have to install grunt with following command:

$ npm -g grunt-cli

then run make docs command to generate docs. The generated API docs will be located in docs folder.

gaia's People

Contributors

albertopq avatar alivedise avatar andreasgal avatar arcturus avatar asutherland avatar benfrancis avatar borjasalguero avatar crh0716 avatar daleharvey avatar delapuente avatar dominickuo avatar etiennesegonzac avatar evelynhung avatar fabi1cazenave avatar fabricedesre avatar gasolin avatar gregorwagner avatar gtorodelvalle avatar huchengtw-moz avatar ian-liu avatar jmcanterafonseca avatar julienw avatar kevingrandon avatar lightsofapollo avatar rik avatar rudylu avatar steveck-chung avatar timdream avatar vingtetun avatar yurenju avatar

Watchers

 avatar  avatar

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.