Manual docs of Extension Test Framework

Review Request #8093 — Created March 31, 2016 and discarded

weijie
Review Board
release-2.6.x
7934
reviewboard

Add the manual docs in Extension Test Framework

The manual docs has been done.

Description From Last Updated

I think if you're going to break it up into two sections, we'll need to be clearer about what each ...

mike_conleymike_conley

This isn't really an example testrunner.py file - it's just got the one line. We'll probably want to put the ...

mike_conleymike_conley

We should describe what the ExtensionTestCaseMixin is and what it does. Instead of declaring that The Author should do this, ...

mike_conleymike_conley

I don't think it's vital to illustrate the method this way. As above, perhaps just say that the ExtensionTestCaseMixin needs ...

mike_conleymike_conley

Typo: ExtensionTestCateseMixin -> ExtensionTestCaseMixin.

mike_conleymike_conley

Perhaps instead of "some testcases", which isn't valid Python, use: def test_my_extension(self): # At this point, your extension is installed ...

mike_conleymike_conley
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
    
    Tool: Pyflakes
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
  2. 
      
WE
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
  2. 
      
WE
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
    
    Tool: Pyflakes
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
  2. 
      
mike_conley
  1. Thanks for starting this Weijei. Don't forget to fill in the Testing Done - we want to know that you've actually tried building the docs.

  2. I think if you're going to break it up into two sections, we'll need to be clearer about what each section entails. We'll probably also want to introduce both sections.

    Perhaps this first section could be "Creating a Test Runner". The second section could be "Writing Tests for the Test Runner".

    Above both sections, like I said, we might want to introduce both sections - as in, explain that there are two components to using the test framework, and what roles they play.

  3. This isn't really an example testrunner.py file - it's just got the one line. We'll probably want to put the imports down here, along with the if __name__ bit.

    Similarly, we might want to remove those things from your first demonstration of this function, and perhaps just describe that reviewboard.extensions.testing.runner.run_extension_tests takes some arguments. See https://www.reviewboard.org/docs/manual/dev/extending/extensions/hooks/auth-backend-hook/ for example.

  4. We should describe what the ExtensionTestCaseMixin is and what it does.

    Instead of declaring that The Author should do this, perhaps it should be phrased as:

    "An individual test should import the ExtensionTestCaseMixin, and extend their test case off of it. The ExtensionTestCaseMixin does lorem ipsum foo bar baz...."

  5. I don't think it's vital to illustrate the method this way. As above, perhaps just say that the ExtensionTestCaseMixin needs to have the extension_class property set.

  6. Typo: ExtensionTestCateseMixin -> ExtensionTestCaseMixin.

  7. Perhaps instead of "some testcases", which isn't valid Python, use:

    def test_my_extension(self):
      # At this point, your extension is installed and
      # enabled in the test runner instance of Review
      # Board, and you can start making assertions.
      pass
    
  8. 
      
WE
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
    
    Tool: Pyflakes
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
  2. 
      
WE
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
  2. 
      
WE
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
  2. 
      
WE
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        docs/manual/extending/extensions/testing.rst
    
    
  2. 
      
WE
david
Review request changed

Status: Discarded

Change Summary:

A similar but separate implementation has landed for Djblets 0.10

Loading...