Actions

Difference between revisions of "Testing Area/Behat Testing/Data set up"

From Mahara Wiki

< Testing Area‎ | Behat Testing
m
m
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 as below.  
+
The behat test.feature is a template that can be used to pre-populate the database as below.<br>
 
Full data specifications at <code>mahara/htdocs/testing/frameworks/behat/classes/BehatDataGenerators.php</code>
 
Full data specifications at <code>mahara/htdocs/testing/frameworks/behat/classes/BehatDataGenerators.php</code>
  

Revision as of 15:34, 10 July 2020

Data set up

The behat test.feature is a template that can be used to pre-populate the database as below.
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 One A    | yes        | textinput=This is some text;tags=texttag |
   | Image JPG            | image          | Page One A    | no         | attachment=Image1.jpg; width=100;tags=imagetag |
   | Image PNG            | image          | Page One A    | no         | attachment=Image2.png |
   | Files to download    | filedownload   | Page One A    | auto       | attachments=mahara_about.pdf |
   | Files to download    | filedownload   | Page One A    | no         | attachments=mahara_about.pdf,Image2.png |
   | External Feed - News | externalfeed   | Page One A    | No         | source=http://stuff.co.nz/rss;count=5 |
   | External Feed - Food | externalfeed   | Page One A    | no         | source=http://www.thekitchenmaid.com/feed;count=3;tags=cat,a,lyst |
   | External Feed - Tech | externalfeed   | Page One A    | no         | source=feeds.feedburner.com/geekzone;count=3;tags=cat,a,lyst |
   | Social Media         | socialprofile  | Page One A    | no         | sns=instagram,twitter,facebook,tumblr,pinterest,mysocialmedia |