Page MenuHomePhabricator

Calling of example test case failed
Closed, InvalidPublic

Description

I wanted to write a unit test for an extension I developed. In order to do so, I wanted to test the example test case.

I can run all unit tests with arc unit --everything but I cannot run the example test case.

At the link, this is suggested

phabricator/ $ arc unit src/infrastructure/testing/testcase/
 PASS   <1ms*  testAllIsRightWithTheWorld

However, the folder testcase does not exist

phabricator/ $ tree src/infrastructure/testing/
src/infrastructure/testing/                                                       
├── fixture                                                                            
│   └── PhabricatorStorageFixtureScopeGuard.php                                              
├── PhabricatorTestCase.php                                                                  
└── __tests__                                                                                      
    └── PhabricatorTrivialTestCase.php                 

Trying to run the test with arc unit src/infrastructure/testing/__tests__ returns No tests to run.

How can I run this test successfully? I also copied the test PhabricatorTrivialTestCase.php to the src/extensions/__tests__ folder because this is where I want to drop my Unit tests for the extension but this also did not run the test.

Phabricator, libphutil and arcanist repositories have been updated today.

Event Timeline

chad added a subscriber: chad.

We don't support third party app development.

See T5447 for more details on the state of app development,

I did not ask for support in third party development.

Here is a example test case documented and a way how to run it which does not work with the current version of Phabricator. That is why I filed a bug report.

If I have to write code and drop it into my local install to reproduce the issue, it's custom development and it's not supported. The documentation may be incorrect, but like a prototype, it's not intended to be ready for end-user use (only internal developers).