You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-32Lines changed: 46 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# Professor M's School for Gifted Coders [](https://travis-ci.org/sugarcrm/school)
2
2
3
-
All of the tutorials at UnCon 2017 will be based on Professor M's School for Gifted Coders. The following sections will explain more about the scenario and how to install the required modules and sample data.
3
+
Professor M's School for Gifted Coders is a module loadable package that can be installed in Sugar. The following
4
+
sections explain more about the scenario and how to install the package and sample data.
4
5
5
6
## Contents
6
7
[About the scenario](#about-the-scenario)
@@ -26,13 +27,11 @@ Professor M aka Professor Marum has created an exclusive not-for-profit school f
26
27
27
28
Learn more about the implemented [Use Cases](docs/UseCases.md) in the [docs](docs/).
28
29
29
-
Want a quick summary? Watch the video below we put together for SugarCon 2017.
30
+
Want a quick summary? Watch the video below.
30
31
[](https://youtu.be/aKBTKcaney4"The Professor M Scenario Part 1 - What is it and why should you care?")
31
32
32
33
## Installation instructions
33
34
34
-
Before beginning any of the tutorials associated with UnCon 2017, you'll want to setup a Sugar instance that has the Professor M scenario installed.
35
-
36
35
Watch the video below for instructions on how to install the scenario. Text-based instructions follow.
37
36
[](https://youtu.be/SO-Rav35X5U"The Professor M Scenario Part 2 - How do you install it?")
38
37
@@ -44,7 +43,10 @@ Watch the video below for instructions on how to install the scenario. Text-bas
44
43
45
44
### Install the modules and customizations
46
45
We've created a custom package you can install. The package will create and customize the modules you'll need for the scenario. The following instructions will walk you throw how to install the package.
47
-
1. Download **sugarcrm-ProfessorM-standard.zip** from the latest [release](https://github.com/sugarcrm/school/releases)
46
+
1. Download the appropriate zip file from the latest [release](https://github.com/sugarcrm/school/releases). If you are
47
+
installing in Sugar Cloud, you will need to select the **production** version of the release. If you are installing
48
+
elsewhere, you can select the **production** release or the **standard** release. The **standard** release includes
49
+
automated testing files while the **production** release does not.
48
50
1. Login to Sugar as an Administrator
49
51
1. Navigate to **Administration** > **Module Loader**
50
52
1. Upload **sugarcrm-ProfessorM-standard.zip**
@@ -56,6 +58,10 @@ We've created a custom package you can install. The package will create and cus
56
58
1. Install the zip as a module loadable package using the steps above.
57
59
1. Download **sugarcrm-ProfessorM-windows-manual-install.zip** from the latest [release](https://github.com/sugarcrm/school/releases).
58
60
1. Unzip the file. Note that you'll find **ProfMForWindowsReadme.txt** and a set of directories inside of the zip.
61
+
If no directories are inside the zip, then all file paths in the `package/src` directory have been deemed short
62
+
enough to be included in a typical Windows installation and you will need to generate the zips yourself locally
63
+
on your own machine (see [Generating the Professor M module loadable packages locally](#generating-the-professor-m-module-loadable-packages-locally)
64
+
for instructions on how to do so).
59
65
1. Open **ProfMForWindowsReadme.txt**.
60
66
1. Follow the instructions inside of the readme to manually copy the files from the zip to your Sugar instance. You
61
67
may need to create directories in your Sugar directory if they do not already exist.
@@ -77,12 +83,9 @@ Sugar will display many modules by default that you will not be using while work
77
83
* Tasks
78
84
* Notes
79
85
* Emails
80
-
* Campaigns
81
86
* Targets
82
87
* Target Lists
83
88
* Forecasts
84
-
* Processes
85
-
* Process Business Rules
86
89
* Documents
87
90
* Cases
88
91
* Tags
@@ -95,13 +98,16 @@ Sugar will display many modules by default that you will not be using while work
95
98
* Revenue Line Items
96
99
* Quotes
97
100
* Reports
101
+
* Campaigns
98
102
* Process Email Templates
99
103
* Process Definitions
104
+
* Process Business Rules
105
+
* Processes
100
106
1. Click **Save**
101
107
102
108
### Use the Sugar REST API to create the Professor M sample data
103
109
In order to create the Professor M sample data, you'll use Postman to run a collection of Sugar REST API calls. Each call in the collection has one or more simple tests associated with it to ensure the call was successful.
104
-
1. Save a copy of [ProfessorM_PostmanCollection.json](https://raw.githubusercontent.com/sugarcrm/uncon/2017/ProfessorM/ProfessorM_SampleData/ProfessorM_PostmanCollection.json)
110
+
1. Save a copy of [ProfessorM_PostmanCollection.json](https://raw.githubusercontent.com/sugarcrm/school/master/data/ProfessorM_PostmanCollection.json)
105
111
1. In Postman, click **Import**
106
112
1. Click **Choose Files** and import **ProfessorM_PostmanCollection.json**
107
113
1. Click the gear icon in the upper right corner and select **Manage Enviornments**
@@ -121,7 +127,9 @@ In order to create the Professor M sample data, you'll use Postman to run a coll
121
127
1. Wait for the collection to finish running. All tests should pass.
122
128
Hint: If you see many failures, you may have forgotten to install the Professor M module loadable package. See the
123
129
instructions in previous section for how to do the install.
124
-
130
+
131
+
If you are using an Enterprise or Ultimate edition of Sugar, you can use the features that leverage Advanced Workflow.
132
+
Save a copy of [ProfessorM_PostmanCollection_AdvancedWorkflow.json](https://raw.githubusercontent.com/sugarcrm/school/master/data/ProfessorM_PostmanCollection_AdvancedWorkflow.json) and (https://raw.githubusercontent.com/sugarcrm/school/master/data/Application_Routing.bpm) to your local filesystem. Update the reference to Application_Routing.bpm in ProfessorM_PostmanCollection_AdvancedWorkflow.json to point to your local filesystem location for that file. Then follow the steps above to import the collection and run it.
125
133
126
134
## Setting up your development environment
127
135
If you want to generate the Professor M module loadable packages yourself or make changes to the code in this repo, you
@@ -492,11 +500,11 @@ your `school/package` directory:
492
500
493
501
The PHPUnit tests can be executed by running the following command from your `school/tests/phpunit` directory on macOS:
494
502
```
495
-
../../vendor/bin/phpunit
503
+
../../package/vendor/bin/phpunit
496
504
```
497
505
or on Windows:
498
506
```
499
-
..\..\vendor\bin\phpunit
507
+
..\..\package\vendor\bin\phpunit
500
508
```
501
509
502
510
##### Automatic execution in Travis CI
@@ -569,9 +577,9 @@ tests.
569
577
Install Yarn which is an NPM compatible package manager. See
570
578
[Yarn Installation Guide](https://yarnpkg.com/lang/en/docs/install/) for more details on how to install Yarn.
571
579
572
-
Next navigate to your school directory and then execute the following commands.
580
+
Next navigate to your `school` directory and then execute the following commands.
573
581
574
-
Navigate to the tests/jasmine directory.
582
+
Navigate to the `tests/jasmine` directory.
575
583
```
576
584
cd tests/jasmine
577
585
```
@@ -653,7 +661,7 @@ Currently, we have PHPUnit tests and Postman tests.
653
661
654
662
#### PHPUnit tests for the Professor M Module Loadable Package
655
663
[PHPUnit](https://phpunit.de/) is a testing framework for PHP. The PHPUnit test files are located in
##### Manual execution using the command line interface
805
806
806
-
You can execute the tests against any running instance of Sugar. The first step is to configure the Postman Environment
807
-
for your particular instance of Sugar. Open [ProfessorM_PostmanEnvironment](data/ProfessorM_PostmanEnvironment.json)
808
-
and update the url, username, password, and rest_endpoint to reflect your instance.
807
+
You can execute the tests against any running instance of Sugar. Note that the Postman tests will NOT be installed
808
+
as part of the Professor M module loadable package. The tests will only be available in your `school` repo.
809
+
810
+
The first step is to configure the Postman Environment for your particular instance of Sugar. Open
811
+
[ProfessorM_PostmanEnvironment](data/ProfessorM_PostmanEnvironment.json) and update the url, username, password, and
812
+
rest_endpoint to reflect your instance.
809
813
810
814
Then you can choose to install Newman to execute the tests or use a Docker image to execute the tests.
811
815
@@ -821,6 +825,11 @@ Navigate to the `school/data` directory in your shell. Execute the tests by run
821
825
822
826
`newman run ProfessorM_PostmanCollection.json -e ProfessorM_PostmanEnvironment.json`
823
827
828
+
You can execute the tests that leverage Advanced Workflow (only available in Enterprise and Ultimate editions of Sugar)
829
+
by running the following:
830
+
831
+
`newman run ProfessorM_PostmanCollection_AdvancedWorkflow.json -e ProfessorM_PostmanEnvironment.json`
832
+
824
833
###### Using Docker
825
834
826
835
[Install Docker](https://docs.docker.com/install) if you haven't already.
@@ -835,6 +844,11 @@ Execute the tests by running the following:
835
844
836
845
Be sure to replace `pathToTheDataDirectoryInYourSchoolRepo` with the path to the `data` directory in your school repo.
837
846
847
+
You can execute the tests that leverage Advanced Workflow (only available in Enterprise and Ultimate editions of Sugar)
848
+
by running the following:
849
+
850
+
`docker run -v pathToTheDataDirectoryInYourSchoolRepo:/etc/newman -t postman/newman_ubuntu1404 run "ProfessorM_PostmanCollection_AdvancedWorkflow.json" --environment="ProfessorM_PostmanEnvironment.json"`
851
+
838
852
Hint: If your instance of Sugar is running inside a Docker container, you may need to add the `--net="host"` option:
839
853
840
854
`docker run -v pathToTheDataDirectoryInYourSchoolRepo:/etc/newman --net="host" -t postman/newman_ubuntu1404 run "ProfessorM_PostmanCollection.json" --environment="ProfessorM_PostmanEnvironment.json"`
0 commit comments