Testing Area/Behat Testing/Data set up
From Mahara Wiki
< Testing Area | Behat Testing(Redirected from Testing/Behat Testing/Data set up)
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 |