Project

General

Profile

action #57263

coordination #36712: [saga] Use YaST specific framework for GUI testing

coordination #50672: [funtional][y][epic] Use libyui-rest-api for YaST modules testing

[functional][y] Add aruba + make test not destructive to ruby gem library to operate UI controls

Added by JERiveraMoya about 2 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
SUSE QA - Milestone 28
Start date:
2019-09-24
Due date:
2019-10-22
% Done:

0%

Estimated time:
5.00 h

Description

Follow-up ticket of #56786 with the remaining part that was not directly related with the library implementation:

Acceptance criteria

  1. Simple non-destructive test is developed for yast2 hostname module (e.g. reading /etc/hosts and checking that all entries are displayed)

Further info

1) The test is destructive, it really modifies the /etc/hosts on the machine.
That's OK when running it in a testing environment (like openQA) but it's not
acceptable if you want to run the same test on your machine during development.

Ideally there should be a way to run the read-only and the read/write tests
separately. E.g. the read-only tests would simply press "Abort" button in the
end to avoid writing the changes to the system.

Or we could pass the read/write mode via the environment and depending on that the
"write" part would be skipped or not, that would avoid duplicating the tests.

We definitely need a way to safely run the tests (at least some safe subset) during the development.

2) Use the "aruba" gem for testing the file content, file existence,
file permissions, command STDOUT or STDERR, etc...
We do not need to reinvent the wheel in
https://github.com/jknphy/libyui_client/blob/master/spec/libyui_client_spec.rb#L39

So far Lady has used aruba only from cucumber tests, but it seems it provides some
helpers also for rspec.

See https://relishapp.com/cucumber/aruba/v/0-11-0/docs/file/check-if-file-has-content

Or maybe there is some other rspec extension for that, but as this is a really common problem,
some library (gem) must already exist...

History

#1 Updated by JERiveraMoya about 2 years ago

  • Due date changed from 2019-10-08 to 2019-10-22

Clarify point one about how they develop their test, in their laptop? container?

#2 Updated by riafarov about 2 years ago

  • Description updated (diff)
  • Status changed from New to Workable
  • Estimated time set to 5.00 h

#3 Updated by JERiveraMoya about 2 years ago

  • Assignee set to JERiveraMoya

#4 Updated by JERiveraMoya about 2 years ago

  • Status changed from Workable to New

#5 Updated by JERiveraMoya about 2 years ago

  • Status changed from New to In Progress

#7 Updated by JERiveraMoya about 2 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF