Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Reorganize "Testing" pages #415

Merged
merged 24 commits into from
Nov 2, 2017
Merged

Conversation

totten
Copy link
Member

@totten totten commented Oct 10, 2017

Based on the evaluation/planning at the Devon sprint, we felt it was important to provide a better framing/summary of the kinds of tests that are available (and when to use them).

This PR reorganizes the content of the "Testing" chapter, migrates in content from civicrm-core READMEs, and opens with a table to visualize the choice of testing techniques.

screen shot 2017-10-30 at 2 08 58 pm

It's planned to put Codeception and Protractor in here as well, but the for the moment I've disabled those links.

(Comment updated Oct 30.)

@seancolsen
Copy link
Contributor

I like where this is going! I'm happy to review it more thoroughly once it's no longer WIP.

@seancolsen
Copy link
Contributor

@totten What's the status of this PR? Still WIP? What else does it need? I haven't looked at it yet. Just trying to whittle down the PR queue atm.

@totten totten force-pushed the master-test-intro branch 5 times, most recently from d6298be to 89da098 Compare October 30, 2017 20:33
totten added a commit to totten/civicrm-core that referenced this pull request Oct 30, 2017
As part of civicrm/civicrm-dev-docs#415 , the dev
docs will assimilate and organize more of the instructions about testing.
totten added a commit to totten/civicrm-core that referenced this pull request Oct 30, 2017
As part of civicrm/civicrm-dev-docs#415 , the dev
docs will assimilate and organize more of the instructions about testing.
totten added a commit to totten/civicrm-core that referenced this pull request Oct 30, 2017
As part of civicrm/civicrm-dev-docs#415 , the dev
docs will assimilate and organize more of the instructions about testing.
totten added a commit to totten/civicrm-core that referenced this pull request Oct 30, 2017
As part of civicrm/civicrm-dev-docs#415 , the dev
docs will assimilate and organize more of the instructions about testing.
@totten totten changed the title (WIP) Reorganize "Testing" pages Reorganize "Testing" pages Oct 30, 2017
@totten
Copy link
Member Author

totten commented Oct 30, 2017

@seanmadsen I think this is a mergeable revision now.

In the summary table, I'm a little on the fence about whether to include the "Trade off" and "Good for" blurbs. Showing them makes the table a better summary; but hiding them makes the table a bit more approachable.

Running civilint is important for any/all code.  Seems a bit arbitrary
emphasizing this point specifically for tests.
The second statement doesn't make much sense without the first statement.
Put them together.
There are multiple tools for testing in JS. We'll want separate pages for each.
1. Add new entries for Protractor, Codeception, and QUnit

2.  This menu includes (a) some pages about the overall testing process and
(b) some pages about specific tools.  Consistently put the general before
the specific.
 * Provide a better visualization of the the different test suites
 * Migrate setup instructions from https://github.com/civicrm/civicrm-core/blob/master/tests/README.md
@totten
Copy link
Member Author

totten commented Oct 31, 2017

Rebased to resolve conflict.

@totten
Copy link
Member Author

totten commented Nov 1, 2017

I'll leave this open for comment until Friday and merge if there's no more issues.

Copy link
Contributor

@seancolsen seancolsen left a comment

Choose a reason for hiding this comment

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

@totten wow these are some fantastic additions! Thanks!

I requested a few small changes. Ready to merge when those changes are resolved.

core/develop tools/git
basics/filesystem framework/filesystem
core/architecture framework/codebase
framework/civimail/tokens https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/
core/architecture framework/codebaseframework/civimail/tokens https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a typo, combining these two lines. Can you fix or explain?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doh, that was a mistake in resolving the merge-conflict. Went too quickly on that. Fixing.

@@ -5,9 +5,11 @@ best-practices/documentation-style-guide documentation/style-guide
extensions/basics extensions
api/general api
hooks/hook_civicrm_trigger_info hooks/hook_civicrm_triggerInfo
testing/setup testing/index
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm 95% sure that testing/setup testing/index needs to be changed to testing/setup testing in order for the redirect to work correctly. Would take more time to test this though because the redirects happen in the publisher app. Grumble. If you're comfortable acting on my 95% "hunch", then can you change to testing/setup testing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, will give a try.

(Iftesting/setup testing doesn't work, we'll find out post-merge -- we can do a quick follow-up then.)

@@ -1,5 +1,5 @@
Documentation+Infrastructure+Canary develop
Book+style+guide best-practices/documentation-style-guide
CiviCRM+Unit+Testing+basic+information testing/setup
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, can you remove /index here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated this (although it's not quite clear in the way Github highlights this line).

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm taking this as a lesson in Github mechanics -- when there's a line edit (removal+addition), you can comment on either the removal or the addition. It seems better to comment on the addition -- because (in that case) Github will automatically recognize that the code-review has been addressed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh nice point! Noted.

Also worth mentioning that I really like the way GitLab allows you to "resolve" separate discussions manually within merge requests. Very slick.

@@ -128,7 +128,7 @@ CiviRules+hooks hooks
Profile+Hooks hooks
Report+Hooks hooks
Tests+in+phpstorm tools/phpstorm/#testing
Testing testing/setup
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, can you remove /index here?

Copy link
Member Author

Choose a reason for hiding this comment

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

ditto

<td>
<a href="phpunit">PHPUnit</a><br/>
<!-- <a href="codeception">Codeception</a><br/> -->
<s><a href="webtest">Selenium</a></s>
Copy link
Contributor

Choose a reason for hiding this comment

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

webtest is a broken link here. Can you fix?

@seancolsen
Copy link
Contributor

Thanks for adjusting this Tim. Looks like everything is now resolved. Merging.

@seancolsen seancolsen merged commit 4ad953b into civicrm:master Nov 2, 2017
@totten totten deleted the master-test-intro branch November 2, 2017 23:39
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
As part of civicrm/civicrm-dev-docs#415 , the dev
docs will assimilate and organize more of the instructions about testing.
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
As part of civicrm/civicrm-dev-docs#415 , the dev
docs will assimilate and organize more of the instructions about testing.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants