Skip to content

Add multiple test site support - #588

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

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

Conversation

@jamos-tay

@jamos-tayjamos-tay commented Jan 16, 2019

Copy link
Copy Markdown
Contributor

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-tayjamos-tay changed the title [WIP] Add multiple test site supportAdd multiple test site supportJan 16, 2019
@yamgent
yamgent self-requested a review January 23, 2019 02:57
Comment threadtest/functional/test.bat Outdated
Comment threadtest/functional/test.bat
@jamos-tay
jamos-tayforce-pushed the multiple-test-sites branch 2 times, most recently from 9acda71 to 67b5db4CompareJanuary 23, 2019 12:13
@jamos-tay

jamos-tay commented Jan 23, 2019

Copy link
Copy Markdown
ContributorAuthor

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

@yamgentyamgent left a comment

Copy link
Copy Markdown
Member

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. 👍

Comment threadtest/functional/test.bat Outdated
Comment threadtest/functional/test.sh Outdated
Comment threadtest/functional/testExternalScripts.md
Comment threadtest/functional/testLayoutsOverride.md
Comment threadtest/functional/testTagDivs.md
Comment threadtest/functional/testTags.md
@jamos-tay

Copy link
Copy Markdown
ContributorAuthor

Rebased, updated

@yamgentyamgent left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

Yup, removed it

@yamgentyamgent modified the milestones: v1.17.1, v1.17.2Jan 28, 2019
@jamos-tay

Copy link
Copy Markdown
ContributorAuthor

Rebased to fix conflicts

Sign up for freeto 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

@jamos-tay@yamgent