Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 30, 2012
  1. @epriestley

    Search for more test locations in PHPUnitTestEngine

    epriestley authored
    Summary:
    See #53
    
      - Work correctly for directories with `%` in their name; this breaks under sprintf().
      - Search for `src/` -> `tests/` style directories.
      - Add coverage for search paths.
    
    Test Plan:
    Ran unit tests.
    
    I don't have a working test case for PHPUnit tests, can one of you guys apply this and verify I didn't break your setups?
    
    Reviewers: quard, aurelijus
    
    Reviewed By: aurelijus
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D3558
Commits on Sep 14, 2012
  1. Publicize formatting unit test result

    vrana authored
    Summary: I want to use it from outside.
    
    Test Plan:
      $ arc unit src/lint/linter/__tests__/
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3493
  2. Use array_mergev() in Phutil test engine

    vrana authored
    Test Plan: This diff.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3491
Commits on Sep 7, 2012
  1. Allow Phutil tests setting link

    vrana authored
    Summary: Also delete some copy pasta.
    
    Test Plan: Next diff.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3455
  2. Link Arcanist test cases

    vrana authored
    Summary: See D3455.
    
    Test Plan: This diff (after rebase).
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3460
  3. Support linking unit tests

    vrana authored
    Summary: This is Arcanist part of D3434.
    
    Test Plan: None.
    
    Reviewers: epriestley, wez
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3450
Commits on Aug 15, 2012
  1. @wez

    Add extraData field to test results

    wez authored
    Summary:
    See discussion on T1630.
    extraData provides more scope for extensions to piggy-back
    more data on the test results and have that pulled up to the UI.
    
    We're using keys like "facebook:complexity" to store additional
    data as part of the test results.
    
    Test Plan:
    Nothing in the codebase touches extraData at the moment, so
    you'll just have to have faith/prove by inspection.
    
    Reviewers: vrana, nh, tuomaspelkonen, epriestley
    
    Reviewed By: epriestley
    
    CC: aran, epriestley
    
    Maniphest Tasks: T1630
    
    Differential Revision: https://secure.phabricator.com/D3276
Commits on Aug 8, 2012
  1. Depend on events when attaching Diff ID to postponed unit tests

    vrana authored
    Summary:
    According to @epriestley, it's nasty and kind of crazy: D2933#1.
    It also stands in my way for D2614.
    
    Test Plan: Rewrote our callsite to event listener and verified that it still works.
    
    Reviewers: tuomaspelkonen, epriestley
    
    Reviewed By: epriestley
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D3171
Commits on Jul 19, 2012
  1. @tombouctou @epriestley

    Allow running phpunit tests from any directory

    tombouctou authored epriestley committed
    Test Plan: Run `arc unit` anywhere.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D3017
Commits on Jun 17, 2012
  1. Display number of assertions in unit test details

    vrana authored
    Test Plan: Show Full Unit Results on this diff.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2777
Commits on Jun 8, 2012
  1. Pass for phutil test that was expected to fail and skip

    vrana authored
    Summary:
    I just hope that we will not create `ArcanistPhutilTestCaseTestCaseTestCase`.
    
    Also fix a copy/paste error (@edward's this time).
    
    Test Plan: `arc unit`
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: edward, aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2692
  2. Remove support for skipping tests

    vrana authored
    Summary: Almost revert D2673 but leave the support for 'repeat'.
    
    Test Plan: `arc help unit`.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2689
  3. Allow skipping unit tests and support 'repeat' workflow arguments

    vrana authored
    Summary:
    We run all tests before deploy but some of them are expected to fail.
    We need to skip them.
    It can be useful also for someone else.
    
    I don't propagate this to `arc diff` as that would be much more complicated - we would need a new state 'partially skipped'.
    
    The 'path' argument needs to be a file, skipping whole dirs is not supported.
    The 'path' argument is in fact engine specific and engines can support format like 'Class::testMethod' but I didn't bother to document it to not confuse people.
    
    Test Plan:
    `arc unit --skip test.php`
    `arc unit --skip ../src/test.php`
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2673
Commits on Jun 6, 2012
Commits on Jun 1, 2012
  1. Move files in Arcanist one level up

    vrana authored
    Summary:
    - `kill_init.php`
    - Manually change library map.
    - Manually rename `/data/` test dirs.
    - [src/lint/linter] `git mv base/ArcanistLinterTestCase.php __tests__/`
    - `arc liberate`
    
    Test Plan: Browse around to make sure I like it better, especially `repository/api`, and `workflow`.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin
    
    Maniphest Tasks: T1103
    
    Differential Revision: https://secure.phabricator.com/D2637
  2. Fix `arc unit` when running from non-root directory

    vrana authored
    Summary:
    `$this->getPaths()` gives us paths relative to repository root.
    We resolve them relative to cwd.
    
    Test Plan: [src] `arc unit difference`
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin
    
    Differential Revision: https://secure.phabricator.com/D2634
Commits on May 31, 2012
  1. @epriestley

    Run phutil unit tests in v2 libraries

    epriestley authored
    Summary:
    Move away from setModule(), to setPathPrefix(). Also simplify test location/selection.
    
    Depends on D2621.
    
    Test Plan: Ran "arc unit".
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1103
    
    Differential Revision: https://secure.phabricator.com/D2622
Commits on May 30, 2012
  1. Depend on autoloading

    vrana authored
    Test Plan:
      arc lint
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin
    
    Differential Revision: https://secure.phabricator.com/D2609
  2. @epriestley

    Upgrade arcanist to libphutil v2

    epriestley authored
    Summary: Mechanical changes from D2588. No "Class.php" moves yet because they aren't necessary for libraries to function.
    
    Test Plan: See D2588.
    
    Reviewers: vrana, btrahan, jungejason
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1103
    
    Differential Revision: https://secure.phabricator.com/D2589
Commits on May 23, 2012
  1. @aurelijus

    Simplify phpunit test names

    aurelijus authored
    Summary:
    More & more use cases come up with empty suite names, guessing
    and making test names nice is mess. Will leave it as it is, except
    data set part, as it could be super long.
    
    Test Plan: - Try running some phpunit tests with & without data sets
    
    Reviewers: epriestley
    
    CC: aran, Koolvin
    
    Differential Revision: https://secure.phabricator.com/D2544
Commits on May 22, 2012
  1. @aurelijus @epriestley

    PHPUnit test name handling improvements

    aurelijus authored epriestley committed
    Summary:
    Better test name handling for tests with data sets.
    Instead of showing test name with full data set, show it's id/name,
    e.g. `testConstructor with data set #1`
    
    Test Plan: - Try running tests with data sets
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin
    
    Differential Revision: https://secure.phabricator.com/D2535
  2. @aurelijus @epriestley

    PHPUnit test engine

    aurelijus authored epriestley committed
    Summary:
    PHPUnit wrapper for arc.
    The idea here is simple - find the test case which is related to the updated
    class file. Generate tmp files for json & clover reports, run phpunit
    with provided arguments.
    It supports phpunit configuration file setting in `.arcconfig`: `phpunit_config`.
    Path should be relative to project root.
    
    Test Plan:
    - Set `unit_engine` to `PhpunitTestEngine`
    - Try running tests with & without `phpunit_config` option.
    
    Reviewers: epriestley, davidreuss
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin, jungejason
    
    Differential Revision: https://secure.phabricator.com/D2472
Commits on Apr 27, 2012
  1. @seporaitis @epriestley

    Wrapper for 'nose' unittest and code coverage tools.

    seporaitis authored epriestley committed
    Summary:
    Wrapper for Python 'nose' (http://readthedocs.org/docs/nose/en/latest/)
    testing tool.
    
    Test Plan:
    Install latest 'nose' v1.1.3. Currently it is available through
    Github only (``pep install git+https://github.com/nose-devs/nose.git``).
    
    Create a Python project with following structure:
    
      /package_name/module_name.py
      /tests/package_name/test_module_name.py
    
    Write some tests
    
    Run ``arc unit``
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin, zeeg
    
    Differential Revision: https://secure.phabricator.com/D2322
Commits on Apr 25, 2012
  1. @epriestley

    Fix PhutilUnitTest issue with symlinks that point into a libphutil li…

    epriestley authored
    …brary
    
    Summary: Currently, if you change a symlink outside a libphutil library and the link target is something inside a libphutil library, we may enter an inifite loop in the "do { ... } while(...)" later. Just bail if the loop won't resolve.
    
    Test Plan: Ran arc unit, Airtime reported the issue resolved by a similar fix.
    
    Reviewers: cpiro, btrahan
    
    Reviewed By: cpiro
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2318
  2. @edwardspeyer

    Allow tests to be skipped

    edwardspeyer authored
    Summary:
    Allow tests to be skipped by calling assertSkipped().  It's not really
    an assertion of anything tangible; more like "assert that we can't
    really assert anything right now".
    
    Test Plan: Added a new test to the PhutilUnitTestEngineTestCase.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin
    
    Differential Revision: https://secure.phabricator.com/D2312
Commits on Apr 23, 2012
  1. @edwardspeyer

    [Tests] Only use concrete TestCases

    edwardspeyer authored
    Summary:
    Don't use abstract subclasses of ArcanistPhutilTestCase, only use
    concrete ones.
    
    This lets you put common functionality in an abstract BaseTestCase
    (which itself is a subclass of ArcanistPhutilTestCase), then implement
    concrete subclasses of the BaseTestCase.
    
    Test Plan: Tested with a simple Base -> {Case1, Case2} setup.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Koolvin
    
    Differential Revision: https://secure.phabricator.com/D2300
Commits on Apr 3, 2012
  1. Return $this from setters

    vrana authored
    Summary:
    Most setters returns `$this` but some don't.
    I guess it's not by purpose.
    
    Test Plan:
      arc lint
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2084
Commits on Mar 26, 2012
  1. @epriestley

    Show a better expected vs actual for tests with large output

    epriestley authored
    Summary: When tests have a lot of output, show a diff of the expected/actual.
    
    Test Plan: Used this when developing D2016 to examine large output usefully.
    
    Reviewers: btrahan
    
    Reviewed By: btrahan
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D2017
Commits on Mar 13, 2012
  1. @epriestley

    Don't show "not executable" for files with no coverage information

    epriestley authored
    Summary: We incorrectly merge array() into empty string, which is later interpreted as "this file is entirely not-executable". Instead, show no coverage information in the UI.
    
    Test Plan: Looked at a README diff with no coverage information, got no UI render.
    
    Reviewers: tuomaspelkonen, btrahan, zeeg
    
    Reviewed By: tuomaspelkonen
    
    CC: aran, epriestley
    
    Maniphest Tasks: T965
    
    Differential Revision: https://secure.phabricator.com/D1863
Commits on Mar 8, 2012
  1. @edwardspeyer

    [ArcanistPhutilTestCase] add ->assertException() to the base test case

    edwardspeyer authored
    Summary: Simpler assert function for asserting a type of exception was raised.
    
    Test Plan: Wrote this for (and tested it with) D1836.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D1837
Commits on Mar 5, 2012
  1. @epriestley

    Raise a better error from PhutilUnitTestEngine when trying to use one…

    epriestley authored
    … copy of libphutil to test another copy
    
    Summary:
    We currently raise a very confusing error when we hit this case:
    
      Exception: The phutil library '' has not been loaded!
    
    Because of the trickiness of init-order stuff, it's difficult to detect this more explicitly earlier -- instead, just raise a more descriptive error.
    
    Test Plan: Ran "arc unit" in a copy of libphutil other than the one arc loads.
    
    Reviewers: btrahan, jungejason
    
    Reviewed By: btrahan
    
    CC: aran, epriestley
    
    Maniphest Tasks: T580
    
    Differential Revision: https://secure.phabricator.com/D1760
Commits on Feb 6, 2012
  1. @epriestley

    Add simple, non-magical exception flow to test cases

    epriestley authored
    Summary: Add a boring, simple construct for handling exception-based test cases.
    
    Test Plan: Ran unit tests.
    
    Reviewers: btrahan, tuomaspelkonen, nh, jungejason, vrana
    
    Reviewed By: vrana
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D1562
Commits on Jan 31, 2012
  1. @epriestley

    Add coverage support to Arcanist

    epriestley authored
    Summary:
    Add "--coverage" and "--no-coverage" flags, mechanisms for reporting
    coverage information, xdebug coverage support, and CLI coverage reports.
    
    Test Plan: Ran coverage locally.
    
    Reviewers: tuomaspelkonen, btrahan, jungejason
    
    Reviewed By: btrahan
    
    CC: zeeg, aran, epriestley
    
    Maniphest Tasks: T140
    
    Differential Revision: https://secure.phabricator.com/D1526
  2. @epriestley

    Finalize Arcanist Classes

    epriestley authored
    Summary:
    Mark all applicable Arcanist classes as "final", except PhutilLintEngine, which
    needs a little finesse.
    
    @jungejason / @nh, does this break any Facebook stuff?
    
    Test Plan: Linter no longer raises warnings. Ran "testEverythingImplemented" in
    Phabricator.
    
    Reviewers: btrahan, jungejason, nh
    
    Reviewed By: btrahan
    
    CC: aran, epriestley
    
    Maniphest Tasks: T795
    
    Differential Revision: https://secure.phabricator.com/D1519
Commits on Jan 4, 2012
  1. @epriestley

    Slightly improve Arcanist unit test output messages

    epriestley authored
    Summary:
      - Show file/line so you can tell which assertion failed if there's a block
    with a zillion of them and they don't have messages.
      - Try to format stuff a little better.
    
    Test Plan:   - Ran some failing unit tests.
    
    Reviewers: btrahan, jungejason
    
    Reviewed By: btrahan
    
    CC: aran, btrahan
    
    Differential Revision: https://secure.phabricator.com/D1304
Something went wrong with that request. Please try again.