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
Removing password and username from all the testing, as we've migrated everything to use CustomID.
Summary:
Removing password and username from all the testing, as we've migrated everything to use CustomID.
Documenting testTitleData.json, and some JCU requirements.
fixes T2232
Test Plan: Jenker!
Reviewers: zac-playfab, #devtools_in-progress
Reviewed By: zac-playfab, #devtools_in-progress
Subscribers: zac-playfab
Maniphest Tasks: T2232
Differential Revision: https://phab.playfabdev.com/D2492
We at PlayFab use Jenkins to automate most of our testing, both for our closed-source API-Server, and our open-source SDKs.
5
+
6
+
JenkinsConsoleUtility (shortened to JCU) is open source, and focuses exclusively on relaying test reports from SDKs built to difficult targets, back into Jenkins in a format familiar to Jenkins. For example, many of our SDKs are deployed to phones or devices, which are not running our Jenkins builder. Jenkins kicks off a build to the device, and then runs JCU, which waits for the device to upload test results. When finished, those test results are posted to the Jenkins job.
7
+
8
+
There are some requirements to make this work:
9
+
* We highly suggest you create a test title which is exclusively for running our tests, which you will not use for your actual game development
10
+
* In your own test title, a specific set of CloudScript functions must be appended to your own
11
+
* They are provided here: https://github.com/PlayFab/SDKGenerator/blob/master/JenkinsConsoleUtility/jcuCloudScript.js
12
+
* You must be running our testing-example projects, provided with most of our sdks
13
+
* Any sdk with semi-weekly releases should have this test project included with the SDK
14
+
* You must provide a testTitleData.json file to the test-example
15
+
* See the detailed described here: https://github.com/PlayFab/SDKGenerator/blob/master/JenkinsConsoleUtility/testTitleData.md
16
+
* You must ENABLE the "Allow client to post player statistics" option in the PlayFab Game Manager
17
+
* PlayFab Website -> Login -> Find your title -> Settings -> API-Features -> check-box
18
+
* For server-authoritative games, or games with leaderboards, this is not suggested, hence the importance of creating a separate title
19
+
20
+
Full documentation of the JCU will be posted here eventually. This isn't designed to be a primary product for our customers to use. It's open source because there's nothing sensitive here, and we're happy to demonstrate our SDK testing process.
testTitleData.json is a file that is required by all of the example-test projects in most of the PlayFab sdks
5
+
6
+
Each example project serves two main purposes in each SDK:
7
+
* Demonstrate to a developer using PlayFab, how to make successful API calls
8
+
* In particular, we demonstrate specific areas of maximum first-time-user benefit, like logging in, Player data and statistics
9
+
* We also demonstrate Cloud Script, which is one of our most powerful features, but can also be somewhat difficult to use properly
10
+
* We also use this same code internally to determine if the SDK is actually working properly
11
+
* This is our internal testing process, made transparent to all of our users, and in fact, usable by their own test-titles
12
+
13
+
This last portion, "running our tests on your own title" comes with a few requirements
14
+
* You must specify a testTitleData.json file which tells our tests which title to use
15
+
* You must unlock a security setting that allows clients to set player statistics (This setting should NOT be set for a live game which is server-authoritative)
16
+
* NOTE: Some tests have a hard coded titleId="6195" in those tests, which is us being sloppy, and we intend to fix these over time
17
+
* Generally, it shouldn't hurt anything if you run your tests on our title, but it's better for both of us if you change this to your title when you see it
18
+
19
+
The format of the testTitleData.json file is as follows:
20
+
```json
21
+
{
22
+
"titleId": "<Found in PlayFab Game Manager>",
23
+
"developerSecretKey": "<Found in PlayFab Game Manager>",
Please note characterName is deprecated, and has already been removed from most of the test-examples in our SDKs. For those few that remain, this can be any valid character name (Those test suites will usually create the character).
31
+
32
+
Please note, the path to testTitleData.json is hard coded in most of the examples to this: "C:/depot/pf-main/tools/SDKBuildScripts/testTitleData.json"
33
+
34
+
Our own testTitleData.json is located at this location and contains the secret key for title 6195, and thus we do not publish this file. You should change this path to your own testTitleData.json location, wherever it may be.
35
+
36
+
Philosophy
37
+
====
38
+
39
+
We feel that by showing you our own testing files, as examples of how to use our SDK, we are guaranteeing a few things:
40
+
* The example code in those files always works
41
+
* Those tests must pass on our own automated testing server in order to be published, and therefore, it is a guaranteed working example of how to make those calls
42
+
* Transparency - This is the testing we do for our SDKs
43
+
* Note, we have EXTENSIVE testing of the API-server, which is not represented by these tests. These are just the SDK tests
44
+
* Promote testing
45
+
* Every one of our SDK testing-examples comes with a working test environment, which you can use in your own projects
Copy file name to clipboardExpand all lines: targets/cpp-cocos2dx/ExampleSource/Classes/PlayFabApiTest.h
+3-22Lines changed: 3 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -312,10 +312,7 @@ namespace PlayFabApiTest
312
312
313
313
// A bunch of constants loaded from testTitleData.json
314
314
staticconst std::string TEST_TITLE_DATA_LOC;
315
-
static std::string userName;
316
315
static std::string userEmail;
317
-
static std::string userPassword;
318
-
static std::string characterName;
319
316
staticbool TITLE_CAN_UPDATE_SETTINGS;
320
317
conststatic std::string TEST_DATA_KEY;
321
318
conststatic std::string TEST_STAT_NAME;
@@ -359,18 +356,12 @@ namespace PlayFabApiTest
359
356
// POPULATE THIS SECTION WITH REAL INFORMATION
360
357
playFabSettings->titleId = ""; // The titleId for your title, found in the "Settings" section of PlayFab Game Manager
361
358
TITLE_CAN_UPDATE_SETTINGS = true; // Make sure this is enabled in your title, found in the "Settings" section, "API Features" section of PlayFab Game Manager
362
-
userName = ""; // This is an arbitrary user name, which will be utilized for this test
363
359
userEmail = ""; // This is the email for the user
364
-
userPassword = ""; // This is the password for the user
365
-
characterName = ""; // This should be a valid character on the given user's account
366
360
}
367
361
368
362
// Verify all the inputs won't cause crashes in the tests
0 commit comments