In our daliy work when a project grows into a relative scale, very often we want to add additional features on an existing function. We can modify the function directly of course, however this violates Open-closed principle. Decorator is an effective solution to address such challenge--the name is pretty straightword to understand, when you decorator … Continue reading Decorator in Python
Category: Python 3
Page Object Design in Python and Selenium
I have seen many people using python for web application automation test, however many of them forget the general best practice. In this article, I will give a complete example on Page Object designing in web application automation test. If you are not familiar with Page Object, feel free to refer my previous post Page … Continue reading Page Object Design in Python and Selenium
Data Driven Test in pytest –fixture
Fixture is definitely a shining point of pytest. It uses annotation @pytest.fixture to put in front of a method. In Python function can be used as parameter of another function. Thus when a function with @pytest.fixture is used as parameter for a test method, the return value of that function will be transferred to the … Continue reading Data Driven Test in pytest –fixture
Data Driven Test in pytest –parametization
Python is becoming the most popular programming language these days. The syntax is simple and expressive, there are tons of Python open source modules and frameworks available, and the community is welcoming and diverse. It's also getting more and more widely used in Automation Test. Data Driven is essential for a same test case but … Continue reading Data Driven Test in pytest –parametization