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 3030 UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
3131 UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
3232 UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
33+ ALTSERVER_HOST : 54.66.58.33
34+ ALTSERVER_PORT : 13000
3335 with :
3436 targetPlatform : StandaloneOSX
3537 projectPath : sample
5355 name : Build-StandaloneOSX
5456 - name : Open application
5557 run : |
56- pwd
57- ls -la
5858 export RUN_IN_BROWSERSTACK="false"
59+ export ALTSERVER_HOST="54.66.58.33"
5960 export ALTSERVER_PORT=13000
60- export ALTSERVER_HOST="159.196.149.251"
6161 chmod -R 755 SampleApp.app
6262 open SampleApp.app
6363 - uses : actions/setup-python@v4
6767 run : pip install -r "sample/Tests/requirements.txt"
6868 - name : Run UI tests
6969 run : |
70+ export ALTSERVER_HOST="54.66.58.33"
7071 export ALTSERVER_PORT=13000
71- export ALTSERVER_HOST="159.196.149.251"
7272 pytest -s -v sample/Tests/test.py
7373
Original file line number Diff line number Diff line change @@ -90,6 +90,22 @@ private static void SetupAltTester(BuildPlayerOptions buildPlayerOptions)
9090 AltBuilder . CreateJsonFileForInputMappingOfAxis ( ) ;
9191
9292 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 ;
93109 AltBuilder . InsertAltInScene ( buildPlayerOptions . scenes [ 0 ] , instrumentationSettings ) ;
94110 }
95111
Original file line number Diff line number Diff line change @@ -85,6 +85,22 @@ private static void SetupAltTester(BuildPlayerOptions buildPlayerOptions)
8585 AltBuilder . CreateJsonFileForInputMappingOfAxis ( ) ;
8686
8787 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 ;
88104 AltBuilder . InsertAltInScene ( buildPlayerOptions . scenes [ 0 ] , instrumentationSettings ) ;
89105 }
90106
Original file line number Diff line number Diff line change @@ -87,6 +87,22 @@ private static void SetupAltTester(BuildPlayerOptions buildPlayerOptions)
8787 AltBuilder . CreateJsonFileForInputMappingOfAxis ( ) ;
8888
8989 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 ;
90106 AltBuilder . InsertAltInScene ( buildPlayerOptions . scenes [ 0 ] , instrumentationSettings ) ;
91107 }
92108
Original file line number Diff line number Diff line change 11import unittest
2+ import os
23from alttester import *
34
45class UnityTest (unittest .TestCase ):
56
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 ()
1518
1619 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+
1726 assert True
You can’t perform that action at this time.
0 commit comments