File tree Expand file tree Collapse file tree 5 files changed +70
-13
lines changed Expand file tree Collapse file tree 5 files changed +70
-13
lines changed Original file line number Diff line number Diff line change 30
30
UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
31
31
UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
32
32
UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
33
+ ALTSERVER_HOST : 54.66.58.33
34
+ ALTSERVER_PORT : 13000
33
35
with :
34
36
targetPlatform : StandaloneOSX
35
37
projectPath : sample
53
55
name : Build-StandaloneOSX
54
56
- name : Open application
55
57
run : |
56
- pwd
57
- ls -la
58
58
export RUN_IN_BROWSERSTACK="false"
59
+ export ALTSERVER_HOST="54.66.58.33"
59
60
export ALTSERVER_PORT=13000
60
- export ALTSERVER_HOST="159.196.149.251"
61
61
chmod -R 755 SampleApp.app
62
62
open SampleApp.app
63
63
- uses : actions/setup-python@v4
67
67
run : pip install -r "sample/Tests/requirements.txt"
68
68
- name : Run UI tests
69
69
run : |
70
+ export ALTSERVER_HOST="54.66.58.33"
70
71
export ALTSERVER_PORT=13000
71
- export ALTSERVER_HOST="159.196.149.251"
72
72
pytest -s -v sample/Tests/test.py
73
73
Original file line number Diff line number Diff line change @@ -90,6 +90,22 @@ private static void SetupAltTester(BuildPlayerOptions buildPlayerOptions)
90
90
AltBuilder . CreateJsonFileForInputMappingOfAxis ( ) ;
91
91
92
92
var instrumentationSettings = new AltInstrumentationSettings ( ) ;
93
+ var host = System . Environment . GetEnvironmentVariable ( "ALTSERVER_HOST" ) ;
94
+ if ( ! string . IsNullOrEmpty ( host ) )
95
+ {
96
+ instrumentationSettings . AltServerHost = host ;
97
+ }
98
+
99
+ var port = System . Environment . GetEnvironmentVariable ( "ALTSERVER_PORT" ) ;
100
+ if ( ! string . IsNullOrEmpty ( port ) )
101
+ {
102
+ instrumentationSettings . AltServerPort = int . Parse ( port ) ;
103
+ }
104
+ else
105
+ {
106
+ instrumentationSettings . AltServerPort = 13000 ;
107
+ }
108
+ instrumentationSettings . ResetConnectionData = true ;
93
109
AltBuilder . InsertAltInScene ( buildPlayerOptions . scenes [ 0 ] , instrumentationSettings ) ;
94
110
}
95
111
Original file line number Diff line number Diff line change @@ -85,6 +85,22 @@ private static void SetupAltTester(BuildPlayerOptions buildPlayerOptions)
85
85
AltBuilder . CreateJsonFileForInputMappingOfAxis ( ) ;
86
86
87
87
var instrumentationSettings = new AltInstrumentationSettings ( ) ;
88
+ var host = System . Environment . GetEnvironmentVariable ( "ALTSERVER_HOST" ) ;
89
+ if ( ! string . IsNullOrEmpty ( host ) )
90
+ {
91
+ instrumentationSettings . AltServerHost = host ;
92
+ }
93
+
94
+ var port = System . Environment . GetEnvironmentVariable ( "ALTSERVER_PORT" ) ;
95
+ if ( ! string . IsNullOrEmpty ( port ) )
96
+ {
97
+ instrumentationSettings . AltServerPort = int . Parse ( port ) ;
98
+ }
99
+ else
100
+ {
101
+ instrumentationSettings . AltServerPort = 13000 ;
102
+ }
103
+ instrumentationSettings . ResetConnectionData = true ;
88
104
AltBuilder . InsertAltInScene ( buildPlayerOptions . scenes [ 0 ] , instrumentationSettings ) ;
89
105
}
90
106
Original file line number Diff line number Diff line change @@ -87,6 +87,22 @@ private static void SetupAltTester(BuildPlayerOptions buildPlayerOptions)
87
87
AltBuilder . CreateJsonFileForInputMappingOfAxis ( ) ;
88
88
89
89
var instrumentationSettings = new AltInstrumentationSettings ( ) ;
90
+ var host = System . Environment . GetEnvironmentVariable ( "ALTSERVER_HOST" ) ;
91
+ if ( ! string . IsNullOrEmpty ( host ) )
92
+ {
93
+ instrumentationSettings . AltServerHost = host ;
94
+ }
95
+
96
+ var port = System . Environment . GetEnvironmentVariable ( "ALTSERVER_PORT" ) ;
97
+ if ( ! string . IsNullOrEmpty ( port ) )
98
+ {
99
+ instrumentationSettings . AltServerPort = int . Parse ( port ) ;
100
+ }
101
+ else
102
+ {
103
+ instrumentationSettings . AltServerPort = 13000 ;
104
+ }
105
+ instrumentationSettings . ResetConnectionData = true ;
90
106
AltBuilder . InsertAltInScene ( buildPlayerOptions . scenes [ 0 ] , instrumentationSettings ) ;
91
107
}
92
108
Original file line number Diff line number Diff line change 1
1
import unittest
2
+ import os
2
3
from alttester import *
3
4
4
5
class UnityTest (unittest .TestCase ):
5
6
6
- # altdriver = None
7
- #
8
- # @classmethod
9
- # def setUpClass(cls):
10
- # cls.altdriver = AltDriver()
11
- #
12
- # @classmethod
13
- # def tearDownClass(cls):
14
- # cls.altdriver.stop()
7
+ altdriver = None
8
+
9
+ @classmethod
10
+ def setUpClass (cls ):
11
+ host = os .getenv ('ALTSERVER_HOST' , '127.0.0.1' )
12
+ port = int (os .getenv ('ALTSERVER_PORT' , '13000' ))
13
+ cls .altdriver = AltDriver (host = host , port = port )
14
+
15
+ @classmethod
16
+ def tearDownClass (cls ):
17
+ cls .altdriver .stop ()
15
18
16
19
def test (self ):
20
+ # Select use device code auth
21
+ self .altdriver .find_object (By .NAME , "DeviceCodeAuth" ).tap ()
22
+
23
+ # Wait for unauthenticated screen
24
+ self .altdriver .wait_for_current_scene_to_be ("UnauthenticatedScene" )
25
+
17
26
assert True
You can’t perform that action at this time.
0 commit comments