mardi 8 octobre 2019

ActivityManager creates a different configuration for CtsMonkeyTestCases

I stumbled with the issue with trying to run CTS tests. Some of them are return errors. CtsMonkeyTestCases -> SeedTest. The idea of test is simple. Test runs consistently the two instances of 'monkey' utility with the same parameters after the running we compare the results.

public void testSeed() throws Exception {
    String cmd1 = MONKEY_CMD + " -s 1337 -v -p " + PKGS[0] + " 500";
    String out1 = mDevice.executeShellCommand(cmd1);
    String out2 = mDevice.executeShellCommand(cmd1);
    assertOutputs(out1, out2);
}

After the running I see such in log such results:

09-23 15:34:10 I/ConsoleReporter: [2/2 x86_64 CtsMonkeyTestCases CJUD4R76af537d] com.android.cts.monkey.SeedTest#testSeed fail: junit.framework.ComparisonFailure: expected:<...ION_DOWN): 0:(705.0,[382].0)> but was:<...ION_DOWN): 0:(705.0,[614].0)>

The log shows that ActivityManager creates consequently two activities with different parameters. Why do we create two activites with different parameters (h570dp vs h562dp) ?

09-23 10:03:52.944 8547 8547 I Monkey : :Monkey: seed=3007 count=125 09-23 10:03:53.450 3315 3437 I ActivityManager: Config changes=400 {1.2 ?mcc?mnc [en_US] ldltr sw768dp w1024dp h570dp 160dpi lrg land car night finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1024, 656) s.10}

09-23 10:03:54.452 8598 8598 I Monkey : :Monkey: seed=3007 count=125 09-23 10:03:55.845 3315 3436 I ActivityManager: Config changes=400 {1.2 ?mcc?mnc [en_US] ldltr sw768dp w1024dp h562dp 160dpi lrg land car night finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1024, 648) s.11}

Aucun commentaire:

Enregistrer un commentaire