Testing Area/Behat Testing/Data set up: Difference between revisions
From Mahara Wiki
< Testing Area | Behat Testing
m (Anitsirk moved page Testing/Behat Testing/Data set up to Testing Area/Behat Testing/Data set up: Consolidating where testing pages sit) |
Rangidaymond (talk | contribs) mNo edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Data set up== | ==Data set up== | ||
The behat test.feature is a template that can be used to pre-populate the database | The behat test.feature is a template that can be used to pre-populate the database as below.<br> | ||
Note: full data specifications at <code>mahara/htdocs/testing/frameworks/behat/classes/BehatDataGenerators.php</code> | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
! Name !! Compulsory fields | ! Name !! Compulsory fields | ||
|- | |||
| institutions || name, displayname | |||
|- | |- | ||
| user || username, password, email, firstname, lastname | | user || username, password, email, firstname, lastname | ||
Line 41: | Line 44: | ||
| journals || ownertype, owner, title | | journals || ownertype, owner, title | ||
|- | |- | ||
| | | journalentries || owner, ownertype, title, entry | ||
|- | |||
| plans || owner, ownertype, title | |||
|- | |||
| tasks || owner, ownertype, plan, title, completiondate, completed(boolean) | |||
|- | |- | ||
| | | blocks || title, type, page | ||
|- | |- | ||
|} | |} | ||
For example: | |||
<nowiki> | |||
And the following "blocks" exist: | |||
# Available fields: title*, type*, data*, page*, retractable* | |||
# Page One A | |||
|title |type |page |retractable|data | | |||
|Text |text |Page 1 |yes |textinput=This is some text;tags=texttag | | |||
|Image JPG |image |Page 1 |no |attachment=Image1.jpg; width=100;tags=imagetag | | |||
|Image PNG |image |Page 1 |no |attachment=Image2.png | | |||
|Downloads |filedownload |Page 1 |auto |attachments=mahara_about.pdf | | |||
|Downloads |filedownload |Page 1 |no |attachments=mahara_about.pdf,Image2.png | | |||
|News |externalfeed |Page 1 |no |source=http://stuff.co.nz/rss;count=5 | | |||
|Food |externalfeed |Page 1 |no |source=http://www.thekitchenmaid.com/feed;count=3;tags=cat,a,lyst | | |||
|Tech |externalfeed |Page 1 |no |source=feeds.feedburner.com/geekzone;count=3;tags=cat,a,lyst | | |||
|Social Media |socialprofile |Page 1 |no |sns=instagram,twitter,facebook,tumblr,pinterest,mysocialmedia | | |||
</nowiki> |
Latest revision as of 15:54, 10 July 2020
Data set up
The behat test.feature is a template that can be used to pre-populate the database as below.
Note: full data specifications at mahara/htdocs/testing/frameworks/behat/classes/BehatDataGenerators.php
Name | Compulsory fields |
---|---|
institutions | name, displayname |
user | username, password, email, firstname, lastname |
groups | name, owner |
personalinformation | username, password |
goals and skills | user, goaltype/skilltype, title |
interests | user, interest |
coverletters | user, content |
educationhistory | user, institution |
employmenthistory | user, startdate, employer, jobtitle |
contactinformation | user, email |
achievements | user, date, title |
books and publications | user, date, title, contribution |
professionalmemberships | user, startdate, title |
forums | title, description, group, creator |
forumposts | group, user, message |
pages | title, ownertype, ownername |
collections | title, ownertype, ownername |
journals | ownertype, owner, title |
journalentries | owner, ownertype, title, entry |
plans | owner, ownertype, title |
tasks | owner, ownertype, plan, title, completiondate, completed(boolean) |
blocks | title, type, page |
For example:
And the following "blocks" exist: # Available fields: title*, type*, data*, page*, retractable* # Page One A |title |type |page |retractable|data | |Text |text |Page 1 |yes |textinput=This is some text;tags=texttag | |Image JPG |image |Page 1 |no |attachment=Image1.jpg; width=100;tags=imagetag | |Image PNG |image |Page 1 |no |attachment=Image2.png | |Downloads |filedownload |Page 1 |auto |attachments=mahara_about.pdf | |Downloads |filedownload |Page 1 |no |attachments=mahara_about.pdf,Image2.png | |News |externalfeed |Page 1 |no |source=http://stuff.co.nz/rss;count=5 | |Food |externalfeed |Page 1 |no |source=http://www.thekitchenmaid.com/feed;count=3;tags=cat,a,lyst | |Tech |externalfeed |Page 1 |no |source=feeds.feedburner.com/geekzone;count=3;tags=cat,a,lyst | |Social Media |socialprofile |Page 1 |no |sns=instagram,twitter,facebook,tumblr,pinterest,mysocialmedia |