project-chip / certification-tool

A test harness and tooling designed to simplify development, testing, and certification for devices, guided by the Connectivity Standards Alliance.
https://csa-iot.org/
Apache License 2.0
36 stars 22 forks source link

[Bug] Unable to run Test Run. Incorrect dut_config attribute cannot be updated #151

Closed stingchang closed 7 months ago

stingchang commented 7 months ago

Describe the bug

After TH application is up and running, when creating new project from GUI the default dut_config has incorrect attribute name. Based on the screenshot and instruction, chip_use_paa_certs should be chip_tool_use_paa_certs However, the GUI tool does not save the parameter name when I click "Create" button. Thus certification tests cannot be run and error message was displayed. @

Steps to reproduce the behavior

  1. Connect to raspberry pi test harness UI interface
  2. Add project
  3. Edit Project Config, change chip_use_paa_certs to chip_tool_use_paa_certs
  4. Update and Create
  5. Create new Test Run, select test cases and then start

Expected behavior

Test Run should work and allow DUT to be tested

Log files

No response

PICS file

No response

Screenshots

image

Environment

Additional Information

Please see recorded video : link

ccruzagralopes commented 7 months ago

@stingchang Can you please update to version v2.10-beta2.1+spring2024 and verify if this problem still happens?

Update steps:

cd certification-tool
./scripts/stop.sh
git fetch
git checkout v2.10-beta2.1+spring2024
git submodule update --init --recursive
./scripts/ubuntu/auto-update.sh v2.10-beta2.1+spring2024
./scripts/start.sh
stingchang commented 7 months ago

Hi @ccruzagralopes I ran these commands but got error saying "cocker-compose command not found"

Screenshot 2024-01-23 at 9 13 08 PM
ccruzagralopes commented 7 months ago

Please run the following commands:

sudo pip3 install docker==6.1.3
sudo pip3 install docker-compose
stingchang commented 7 months ago

mmm... doesn't seem to work. Any suggestion?

image
ccruzagralopes commented 7 months ago

It usually takes some time for it to load after running the start script. You can run docker logs certification-tool_frontend_1 and docker logs certification-tool_backend_1 to verify if there was any error.

stingchang commented 7 months ago

Okay now it's on after waitiing for a bit but there's backend error

WARNING: Requirement '/app/test_collections/sdk_tests/sdk_checkout/sdk_runner/*.whl' looks like a filename, but the file does not exist
ERROR: *.whl is not a valid wheel filename.

image

image
ccruzagralopes commented 7 months ago

Oh, it seems that there are some missing files in the backend container. Please run the following commands:

# in certification-tool repo
./scripts/stop.sh
rm backend/test_collections/sdk_tests/sdk_checkout/.version
docker rmi ghcr.io/project-chip/csa-certification-tool-backend:latest
./backend/scripts/build-docker-image.sh --latest
./scripts/start.sh
stingchang commented 7 months ago

Hi @ccruzagralopes The app can start and run now but unfortunately the original issue is not resolved. in the Project Config the attribute name is still chip_use_paa_certs by default and cannot be updated after I "Create" the project

stingchang commented 7 months ago

I briefly looked at the code change for the version [v2.10-beta2.1+spring2024] but did not see related fix. Can you advise?

stingchang commented 7 months ago

Alternatively can you let me know if I can modify the Project Config directly. Maybe through cli tool or use vim to edit it somewhere in the file system on raspberry pi to change chip_use_paa_certs to chip_tool_use_paa_certs as temporary workaround?

ccruzagralopes commented 7 months ago

Hi @stingchang the attribute has been renamed to chip_use_paa_certs, you don't have to change the Project Config (the user guide needs to be updated, I'll work on that).

What I don't understand is why the execution is producing the error. I was able to run this test case with the default Project Config without any errors. It seems to me like the backend is not properly updated in your environment, so there's some part of the code that still references the old variable chip_tool_use_paa_certs.

Did you get any error when running git submodule update --init --recursive? can you please run git submodule status on the certification-tool repository?

stingchang commented 7 months ago

Hi @ccruzagralopes ,

I can finally get the test process run. I am having other issues commissioning physical devices or sample apps provided by connectedhomeip repo. That maybe a separate issue so I'm closing this bug now. Hope I can figure out what's the cause. Thank you very much for the support.