Week 6 – CST438 Software Engineering
Write a weekly entry describing important things you
learned this week.
This week we read chapter 25, Compute as a service (Caas),
from Software Engineering at Google. This chapter covers how Google uses compute
as a service to abstract hardware issues which allows developers to deploy
software without having to worry about the constraints of physical infrastructure.
The chapter also brings up the concept of pets vs cattle. In this analogy, if
your server is a pet, it is expected that you will look after it and nurse it
back to health if something goes wrong with it. If your servers are cattle and something
where wrong with it, you would use automation to replace it with a new one.
They use this analogy to explain that developers must embrace the cattle and
not pets mindset to make software scalable, resilient, and idempotent.
From our assignment, Iteration 3 System Test, I learned how
to deal with finding repeated React components that contain a <dialog>
tag. When you try to find an input or button element using the Selenium
findElement method you should make sure you are getting the correct element. Otherwise,
you will get an “element not interactable” exception. The reason you might get
a different element than expected is because the dialog might be closed until
the element is activated, for example a repeated element on a table.
The solution is to first find the <tr> for the row, assign
it to a web element, and then search under that web element for the input or
button instead of searching from the DOM root using WebDriver. Another solution
is to define a single dialog with a prop for the repeated element action. This
will use only one dialog instead of one dialog for each row.
Comments
Post a Comment