Implementation of FlaUI and Wrapper Class

For this week, I’ve started with the unit testing for the Hash Generator application. However, due to the Hash Generator is a Windows Form application , I’ve faced the problem when conducting the unit testing. It will pop out the message box while the test is running while I will need to close the dialog manually while running the unit tests.

In order to solve this problem, I had implemented the FlaUI which is a .net library which helps with automated UI testing of Windows applications. Not only that, I’ve also learned to implement the Thread.Sleep() and Retry.WhileException() which is used to retry the automation process if it fails to find descendants.

After that, I had implement the User and Privilege Wrapper class for the entire User Module in order to place the logged in user in the wrapper class for other module to verify the user’s privilege and authorize with relevance rights.

Modifications on User Module

For this week, I’ve been assigned with new tasks that required to move the user creation features from user module to hash generator project and implement new features such as user edit, delete and editable custom salt in hash generator project.

Firstly, I’ve create the UI for the hash generator. I’ve also created a new model class and database table that used to store the editable custom salt. For the hash generator, it allows user to add and update a custom salt that will be used together with the hash generation. By updating the custom salt, it will reset all user password to default password.

After the hash generator project had finish implemented those features, I’ve started to remove the existing features from the user module. I’ve also create unit tests for the hash generator project.

Development of User Module

For the second week, I’ve continue with the development of user module that being assigned in last week. For last week’s progression, the user context had been developed and configured. Therefore, I’ve started to develop the UI for both login and registration view.

While the process of developing the view model for both views, I had face the problem on the PasswordBox UI element which blocks the binding from view model. After I referred the sample code and search for solutions, I’ve learnt and able to handle the parameter passing of PasswordBox elements to view model.

Not only that, I’ve also setup some unit tests for all view models that I’ve created. However, I was not able to use the [Fact] attribute for the unit tests since the unit tests will require UI element to run the unit test for the login and registration view model. Therefore, instead of [Fact] attribute, I’ve used the [StaFact] attribute which allowed the tests to run with the UI elements.

Lastly, I’ve being assigned with new task which is to develop a new view that allow user to modify their display name and password as well.