1
1
syntax = "proto3" ;
2
2
package decentraland.kernel.apis ;
3
3
4
+ import "decentraland/common/vectors.proto" ;
5
+
4
6
service TestingService {
5
7
// sends a test result to the test runner
6
8
rpc LogTestResult (TestResult ) returns (TestResultResponse ) {}
7
9
// send a list of all planned tests to the test runner
8
10
rpc Plan (TestPlan ) returns (TestPlanResponse ) {}
9
11
// sets the camera position and rotation in the engine
10
12
rpc SetCameraTransform (SetCameraTransformTestCommand ) returns (SetCameraTransformTestCommandResponse ) {}
13
+ // take a screenshot and compare it with a stored one
14
+ // it hides the explorer hud and ui, primary player and players of avatar scenes
15
+ rpc TakeAndCompareScreenshot (TakeAndCompareScreenshotRequest ) returns (TakeAndCompareScreenshotResponse ) {}
11
16
}
12
17
18
+ message TakeAndCompareScreenshotRequest {
19
+ // the source path in the scene where the screenshot is stored,
20
+ // the snapshot taken is compared with the stored one
21
+ string src_stored_snapshot = 1 ;
22
+ // the camera position where is set before and while taking the screenshot, relative to base scene
23
+ decentraland.common.Vector3 camera_position = 2 ;
24
+ // the camera position where is target to before and while taking the screenshot, relative to base scene
25
+ decentraland.common.Vector3 camera_target = 3 ;
26
+ // width x height screenshot size
27
+ decentraland.common.Vector2 screenshot_size = 4 ;
28
+ // comparison method choice and parameters values
29
+ oneof comparison_method {
30
+ ComparisonMethodGreyPixelDiff grey_pixel_diff = 5 ;
31
+ }
32
+
33
+ message ComparisonMethodGreyPixelDiff {}
34
+ }
35
+
36
+
37
+ message TakeAndCompareScreenshotRequest {
38
+ bool stored_snapshot_found = 1 ;
39
+ oneof comparison_method_result {
40
+ ComparisonMethodGreyPixelDiffResult grey_pixel_diff = 2 ;
41
+ }
42
+
43
+ message ComparisonMethodGreyPixelDiffResult {
44
+ float similarity = 1 ;
45
+ }
46
+ }
13
47
14
48
message TestResult {
15
49
string name = 1 ;
@@ -35,21 +69,8 @@ message TestPlan {
35
69
message TestPlanResponse {}
36
70
37
71
message SetCameraTransformTestCommand {
38
- Vector3 position = 1 ;
39
- Quaternion rotation = 2 ;
40
-
41
- message Vector3 {
42
- float x = 1 ;
43
- float y = 2 ;
44
- float z = 3 ;
45
- }
46
-
47
- message Quaternion {
48
- float x = 1 ;
49
- float y = 2 ;
50
- float z = 3 ;
51
- float w = 4 ;
52
- }
72
+ decentraland.common.Vector3 position = 1 ;
73
+ decentraland.common.Quaternion rotation = 2 ;
53
74
}
54
75
message SetCameraTransformTestCommandResponse {}
55
76
0 commit comments