When we developing a project and serving for the user with a lot of function. And some of this function is called in multiple place. when a new requirement is come which need to modify the code of the old function. How can you ensure the ensure old function won’t be broken by the change you make. human test? too native. Human always make mistake. So we need the machine to check for us.
Layer Test (Deprecate)
we use mockito to mock all the dependencies injected (the database, the third party api) to the layer, in the Controller layer , we mock the Service function, in the Service layer, we mock the Dao function;
some element have no id or name, is not easy to locate it . there is two ways to locate it: Xpath, cssSelector. but how to know what the element’s xpath/cssSelector is? Chrome!!
open the page in Chrome and press F12 to open the Developer Tool Panel. Select the element and right click to copy the xpath/cssSelector. something like:
all the bugfix are commit direct to ‘bugfix’ branch, all members commit in the same branch. it make the commit history unreadable and everyone have to pull&merge others’s code which is not the current work in their hand frequently and make git hard to handle.