lgirdk / boardfarm

Automated testing with python
BSD 3-Clause Clear License
21 stars 33 forks source link

connect multiple devices #351

Closed dollysingh31 closed 4 years ago

dollysingh31 commented 4 years ago

I have been working with manual testing for quite some time now and I would like to automate my test cases with the help of boardfarm. It is quite interesting and almost similar to my setups which I am using currently (Roters, EXtenders etc..,).

Now, I am trying to create an mesh consisting of a router and an extender connecting to it. I am able to work on both the devices seperately, but now my Testcase has a requirement of logging into both the consoles and check for the various parameters to compare and verify them. could you provide any suggestion on how to perform the same.

mbanders commented 4 years ago

We use the word "station" to describe one or more things that are connected together in some way - or things that we want to use together.

So in your boardfarm config JSON file here is how to describe one "station" that has two things you want to connect to:

{
    "station1": {
        "board_type": "rpi3",
        "conn_cmd": "telnet 192.0.0.5 2001",
        "connection_type": "local_cmd",
        "devices": [
            {
                "cmd": "telnet 192.0.0.5 2005",
                "color": "cyan",
                "name": "lan",
                "type": "debian"
            }
        ]
    }
}

Then to connect to this station just do: bft -x connect -n station1 and you'll be able to run commands on the console of the DUT and other devices.

dollysingh31 commented 4 years ago

Thanks for the information.