Device Pool - MODEL NOT_IN Rule not working

0

I'm creating a device pool with AWS CLI and want to exclude 2 models, but they keep showing in the created pool, any advice? Thanks

Note: I've also tried excluding with MANUFACTURER, but it does not work either.

These are the rules I'm using:

[
    {
        "attribute": "AVAILABILITY",
        "operator": "EQUALS",
        "value": "\"HIGHLY_AVAILABLE\""
    },
    {
        "attribute": "PLATFORM",
        "operator": "EQUALS",
        "value": "\"ANDROID\""
    },
    {
        "attribute": "FORM_FACTOR",
        "operator": "EQUALS",
        "value": "\"PHONE\""
    },
    {
        "attribute": "OS_VERSION",
        "operator": "GREATER_THAN_OR_EQUALS",
        "value": "\"8.0.0\""
    },
    {
        "attribute": "OS_VERSION",
        "operator": "LESS_THAN_OR_EQUALS",
        "value": "\"11\""
    },
    {
        "attribute": "MODEL",
        "operator": "NOT_IN",
        "value": "[\"OnePlus One\",\"LG Stylo 5\"]"
    }
]
asked 2 years ago236 views
2 Answers
0
Accepted Answer

Hi,

It seems that I am unable to replicate this behavior and we may need some additional details. That is, the NOT_IN operator works for both MODEL and MANUFACTURER in the tests which I have done.

First, I use the AWS CLI to create a device pool: aws devicefarm create-device-pool --name testpool --rules file://device-pool-rules.json --project-arn [MY_PROJECT_ARN] --region us-west-2

Here is the contents of my device-pool-rules.json file

[
    {
        "attribute": "MODEL",
        "operator": "NOT_IN",
        "value": "[\"OnePlus 8T\",\"LG Stylo 5\"]"
    },
    {
        "attribute": "MANUFACTURER",
        "operator": "NOT_IN",
        "value": "[\"APPLE\",\"SAMSUNG\"]"
    }
]

When I try to create a test run and reach the "Select Devices" stage and then select my Pool "testpool", I can confirm that SAMSUNG, APPLE and 2 specified devices are not included. Here are the devices that I can see for your reference:

Sony Xperia XZ3
Google Pixel 2 XL
Google Pixel 4 XL (Unlocked)
Google Pixel 2 XL
Google Pixel 5 (Unlocked)
Google Pixel 3
Google Pixel 2
Google Pixel XL
Google Pixel 2
Motorola Moto G 4
Dell Venue 8 7840
Google Pixel 3 XL
ASUS Nexus 7 - 2nd Gen (WiFi)
Google Pixel 4a
Google Pixel
Google Pixel 3 XL
Moto G7 Play
Google Pixel 4 (Unlocked)
Google Pixel 4 (Unlocked)
Google Pixel 3a
Google Pixel 3
Google Pixel 3a XL
Google Pixel 5 (Unlocked)
Google Pixel 3a XL
Google Pixel 6 (Unlocked)
Google Pixel 6 Pro (Unlocked)
Google Pixel 4a

** It seems that we do not actually have OnePlus One in the list of devices. The only Oneplus device I can find is OnePlus 8T. Please let me know if you are seeing differently on your end.

Can you kindly test my device-pool-rules.json and see if this works for you in filtering the MODEL and MANUFACTURER? This is to confirm if there may somehow be an issue with these 2 attributes or perhaps if there is some combination of attributes which is leading to unexpected behavior.

Can you also share your exact steps in creating the device pool? Is there any difference in how I created mine? Also, how are you checking the devices in the pool?

AWS
SUPPORT ENGINEER
Ryan_A
answered 2 years ago
0

Thanks for your answer. I see now the problem.

Indeed the options IN and NOT_IN are working, but my confusion is that when editing the pool from Device Farm->Mobile Device: Projects->Settings->Device pools, the devices I filtered out still show up in the list. But when I create a test run manually, in the "Select Devices", the created pool shows what I expected ( I also corrected the Model to OnePlus 8T).

So I think it looks like a bug/limitation in the Edit the device pool page since I am not able to select IN nor NOT_IN options when creating a dynamic device pool (Model only accepts CONTAINS).

And when created manually through the JSON, that page is not filtering out the models accordingly.

Thanks again!

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions