Skip to content

Add multiple test site support#588

Merged
yamgent merged 4 commits intoMarkBind:masterfrom
jamos-tay:multiple-test-sites
Jan 30, 2019
Merged

Add multiple test site support#588
yamgent merged 4 commits intoMarkBind:masterfrom
jamos-tay:multiple-test-sites

Conversation

@jamos-tay
Copy link
Contributor

@jamos-tay jamos-tay commented Jan 16, 2019

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [X] New feature

Fixes #574

What is the rationale for this request?

Some features, such as tagging, must be tested on different sites since the test cases are mutually exclusive.

What changes did you make? (Give an overview)

Allow support for any number of test sites.

Revamped test directory structure:

  • Old:
test/
  unit/
    (unit tests)
  test_site/
    (site files)
    test.sh
    test.bat
    testUtil/
      (test utils)
  • New:
test/
  unit/
    (unit tests)
  functional/
    test.sh
    test.bat
    testUtil/
      (test utils)
    test_site/
      (test site files)
    test_site_2/
      (test site 2 files)
    test_site etc... /
      (...)

Creating a new test site:

  • Create a folder in test/functional
  • Run markbind init in the folder, write test site as per normal
  • Create an expected directory within the folder and populate with expected files
  • Add the folder name to these two lines:

test.sh

set sites=test_site test_site_2   // Add the folder name here

test.bat

declare -a sites=("test_site" "test_site_2")   // Add the folder name here

Note: Ensure expected directory is ignored (Add expected/* to the site.json ignore), and that no src or glob matches any of the expected files (the default glob **/*.+(md|mbd) causes some problems)

Is there anything you'd like reviewers to focus on?

The current test_site_2 folder is just there to show the feature works, it stores a fresh init site. Will remove before merge. No edits made to test_site, except for removing 3 lines from the site.json

How do we want to organize the tests? For example, say we have:

  • Feature A: Test case A1 and Test case A2 are mutually exclusive
  • Feature B: Test case B1 and Test case B2 are mutually exclusive

We could do something like this:

  • Site 1: Other tests
  • Site 2: A1, B1
  • Site 3: A2, B2

@jamos-tay jamos-tay changed the title [WIP] Add multiple test site support Add multiple test site support Jan 16, 2019
@jamos-tay jamos-tay force-pushed the multiple-test-sites branch from 0bb6ec4 to 60345eb Compare January 16, 2019 16:36
@yamgent yamgent self-requested a review January 23, 2019 02:57
@jamos-tay jamos-tay force-pushed the multiple-test-sites branch 2 times, most recently from 9acda71 to 67b5db4 Compare January 23, 2019 12:13
@jamos-tay
Copy link
Contributor Author

jamos-tay commented Jan 23, 2019

Rebased, updated

I placed all the test_site related changes in a separate commit, so you should just have to look at the Add multiple test site functionality commit for review

Copy link
Member

@yamgent yamgent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I placed all the test_site related changes in a separate commit, so you should just have to look at the Add multiple test site functionality commit for review

Thanks a lot, that makes the reviewing process much easier. 👍

@jamos-tay jamos-tay force-pushed the multiple-test-sites branch from 67b5db4 to 97bdcd3 Compare January 25, 2019 13:20
@jamos-tay
Copy link
Contributor Author

Rebased, updated

Copy link
Member

@yamgent yamgent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As you mention, you will remove test_site_2 right?

@jamos-tay
Copy link
Contributor Author

Yup, removed it

@yamgent yamgent modified the milestones: v1.17.1, v1.17.2 Jan 28, 2019
@jamos-tay jamos-tay force-pushed the multiple-test-sites branch from f38593a to ede3281 Compare January 28, 2019 15:31
@jamos-tay jamos-tay force-pushed the multiple-test-sites branch from ede3281 to ac11ce2 Compare January 28, 2019 15:34
@jamos-tay
Copy link
Contributor Author

Rebased to fix conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System tests: allow more than one test_site

2 participants