I am looking to set up a data-driven approach for my python selenium project (there is none currently). Planning to have the data file as xlsx.
I use pytest in my project. Hence, I explored ddt, @data, @unpack and pytest.mark.parametrize.
I am able to read my excel values as pass them with @data-unpack or parametrize. However, in my case, each of my tests will use selected columns from my data file - not all.
eg) My data list will be like this (user, password, item_number, item_name)[('user1', 'abc', 1, 'it1234')('user2', 'def',2, 'it5678')]
My function1 (test 1) will need to parameterize user and password columns only. My function2 (test 2) will need to parameterize item_number and item_name columns only.
What library or method can I use for my need? Basically, I need to be able to parameterize specific columns from my data file for my tests.