rsmp-nordic / rsmp_validator

Official RSMP Nordic automated test tool, build with Ruby and Rpec.
https://rsmp-nordic.github.io/rsmp_validator/
MIT License
4 stars 2 forks source link

M0018 set cycle time test - configurable cycle length #462

Open pksoft72 opened 1 day ago

pksoft72 commented 1 day ago

In this test

    # 1. Verify connection
    # 2. Send control command to set cycle time
    # 3. Wait for status = true
    it 'M0018 set cycle time', sxl: '>=1.0.13' do |example|
      Validator::Site.connected do |task,supervisor,site|
        status = 5     ## <<<<<<<<< here
        plan = 0
        prepare task, site
        set_cycle_time status, plan
      end
    end

is hardcoded cycle length value to 5 seconds.

I prefer testing on near real conditions and our Cross RS4S controller supports only extending original plan and not shrinking.

emiltin commented 1 day ago

I don't think we have any requirement that the cycle time can be reduced. Perhaps we should change the test to first read the cycle time, then extend it, e.g. with 5s.

pksoft72 commented 1 day ago

and then return back, otherwise it will grow with each test run

emiltin commented 1 day ago

You right, we should take care to reset it. Another option would be to keep the normal and extended cycle time as a test config, but I think it's easier if we can avoid adding test configs.