Test view C# simulate user action [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Improve this question
I am doing a project in MVC 3 with C# and would like to put test cases to simulate user actions in Views, and compare if the data was saved correctly in the database. But searched and did not find any material or good example.
Any suggestions how to do?

This is called "end-to-end" testing, or "integration" testing, and there are many frameworks and solutions out there for this.
One that I have used in the past is Selenium: http://docs.seleniumhq.org/
But there are many others: http://en.wikipedia.org/wiki/List_of_GUI_testing_tools
They are called "end-to-end" because they automate the UI as if it is the user performing the actions, and then they run steps to validate the results of said actions; in this way, they test the entire application at once rather than each independent component individually (as is the case with Unit Tests).

An important aspect of writing tests is that views and UI are difficult to test / simulate. MVC and MVVM get around this by letting you test your Model and Controller or your Model and ViewModel.
There are tools that help you to test the views for doing UI testing like Watin, Selenium etc.

Related

Automation testing framework for webservices [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am new to VS( about 6 months), we have an application built using WCF and I am looking for some pointer to build a automation framework around it.
I tried with soap UI but its too simple for my application, any suggestions/pointers where and how should I start building this framework( only option I see here is Nunit.
here is my requirement, I am looking more of step by step guide to achieve this
A simple framework which will send some precooked input to the service and will have some expected value, this expected value will then matched against the actual value assert.
This sounds like a good candidate for Visual Studio's Web & Load Test feature. I personally use these to test WCF endpoints frequently. You can either record steps using your browser, or write code that consumes your service. Either way, it functions just as a normal unit test does.

Creating Multiple DbContext in Entity Framework example [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am going to develop a project where i would like to use Entity Framework 5 with Code First Approach. I want to use multiple DbContext file. So can anyone please give an example with with a sample project to demonstrate multiple DbContext file. I will be highly grateful.
Thanks .
I don't know if this is a good idea, because there are many side effects. Have a look here:
Entity Framework: One Database, Multiple DbContexts. Is this a bad idea?
But in fact it should be working when you look at the latest comment on this thread. Just define the ConnectionString in the context and set it to the same in every context class.
If you need more informations please provide us with more informations what you are trying to achieve and what's your requirements.

Which Unit Test framework to use for the projects that requires User Input [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
My project requires Inputs from the User like clicking submit button , waiting for recording then again clicking some other button etc. so How can one do Unit Testing for such modules. I read a lot about Moq. does Moq satisfies this need.
Thanks
You can also use Microsoft Coded UI Tests. Disadvantage is that you need at least Visual Studio (2012) Premium. Works fine in your projects.
Unit testing solves different kind of problem than what you're facing. Unit tests are supposed to exercise (small) units of code, not entire user interaction scenarios. In your case, you could have unit test which will veryify that submit button logic works as intended. Then another test for second button. Small parts of your code - not entire scenarios.
To test those (test interaction scenarios), you either need human testers or more complex tools, like Test Complete (which allows you to do just that; record user actions and verify results) or Sikuli.

Library or app to dynamically compare two dbs and suggest transform scripts [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I did a search online and was not able to find any tool or app that were designed to do this. I am looking for a set of C# class libraries you can link or reference into your code, or external command-line application that would allow me to dynamically compare two database schemas and generate scripts for transforming one database into the other, without loosing any data in a relatively speedy fashion. All tools I have seen so far, works in a static manner, i.e. you are comparing one db to the next to generate change scripts on your own local system. I am planning to include this in an installer, so it will run on a remote system therefore making it critical that it is possible to automate the process. Also licensing should be somewhat successible to that fact, i.e. a small fee per install is acceptable, or a larger one time fee and no inclusion fee.
Redgate can do that. Try their site http://www.red-gate.com/products/sql-development/sql-compare/

MS Access Query Designer - similar functionality using standard .NET 3.5 controls? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I would like to achieve something very similar to Microsoft Access query designer - I am talking about a plane(canvas?)-like surface on which users can place and move controls. Is this even possible?
If it isn't possible with free .NET controls - then are there any paid ones, which offer similar functionality?
Anything is possible if you try hard enough.
I would explore WPF, it will provide capabilities to custom build your own controls and will get rid of that tedious work of keeping the UI updated.
Make sure to follow a good UI pattern if you do end up working with WPF, here is a good video that explains how to implement MVVM in WPF.

Categories