Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I have a situation. The webpage that I am testing is developed using AngularJS and KnockoutJS.
Search for a hotel and other pages in the website are developed using Angularjs.**
The Booking of the hotel and payments are developed using knockoutjs.
I am aware that Jasmine framework is used to test Knockoutjs applications.
Can I Use Protractor framework in c# for both Angularjs and knockoutjs application?
Or is there any other e2e testing framework to test such webapplications?
Protractor is for E2E testing and Jasmine is to javascript code testing. So if you're requirement is to test UI based testing go with Protractor or else go with Jasmine for code testing.
You go through following for more information on Protractor and Jasmine
Protractor
➔ It is an open source and end-to-end test framework specially for AngularJS web applications.
➔ It was introduced during AngularJS 1.2 as a replacement of the existing e2e testing framework ‘Angular Scenario Runner’
➔ It was built by a team in Google on the top of WebDriverJS with existing technologies such as Selenium, Node.js
Jasmine:
Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks.
Protractor VS Jasmine:
➔ Protractor has been developed for UI based testing activity(e2e testing), whereas Jasmine is to test JavaScript Code
➔ To develop e2e test scripts with Protractor, it needs BDD framework(Jasmin or Cucumber or Mocha) together for structuring the test scripts, whereas to test java script code with Jasmine, it doesn't require any other frameworks together
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 days ago.
Improve this question
I recently moved to a project which is having C# APIs. CI/CD pipeline has been setup for continuous deployment. The project is almost build from past 5+yrs.
The project has a set of API automation tests configured in CI/CD pipeline which will be executed during deployment to validate whether all the APIs are working. If any test fails, API won't get deployed.
Design and content of API automation test:
C# test project using Microsoft Unit testing.
Uses REST client to call APIs for testing.
For each API (GET/POST/PUT/DELETE) a separate test method has been written which will call the actual API using REST client.
The test will call actual API and does database operations (CRUD) which delays execution of test process which in-turn delays deployment.
Doubt:
Is it a good practice / approach to have API tests which is performing CRUD operations by calling each and every API during deployment into various environments?
We have Unit tests for each API where we use MOQ. Unit tests will be executed when we raise PR (pull request) for merging to master. And also we have minimal required integration tests. So, do we need to have a separate API test (that does CRUD operation) during deployment?
We are trying to have best practices in place to avoid blockages / overloading tests during deployment.
Please suggest if there are any best practices related to having different types of tests for C# API projects.
Thanks!!! in advance...
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
So, near 6 months I learning Java. But now I'm got a good job vacancy on c#, .net. I'm very interested in this job. They know about that I'm learned java, so they gave me a test task. And I ask about help from one of the most powerful community in the world. Can somebody explain me what technology I must use for each concrete part, and maybe give me GitHub example for study, or explain mechanism of dialog between technology. Or make some analogy from java
I need to make database with tables, and web service for it, and HTML page for view. At first page will load all records from database, but second it will load only fresh records. And in this web form gone be some buttons for queries to database.
Technical requirements:
no asp.net web forms, it should be HTML
table should be made on tag and with CSS styles
logic for working with table, should be on javascript
calling web service on js too
web service can be asmx, rest, WCF
queries from buttons can be made by js or on web service by SQL or LINQ
The target technologies should be using the net core technologies.
You can use html with net core MVC https://learn.microsoft.com/en-us/aspnet/core/mvc/overview?view=aspnetcore-5.0
The ASP.NET Core MVC framework is a lightweight, open source, highly testable presentation framework optimized for use with ASP.NET Core.
ASP.NET Core MVC provides a patterns-based way to build dynamic websites that enables a clean separation of concerns. It gives you full control over markup, supports TDD-friendly development and uses the latest web standards.
This framework can also supply rest api connectivity that can be called from javascript.
You can also integrate with a framework like angular: https://medium.com/asp-net-and-angular/how-to-create-an-asp-net-mvc-5-project-with-angular-6-in-visual-studio-part-1-8b116e19a335
The ASP.NET Core MVC framework is a lightweight, open source, highly testable presentation framework optimized for use with ASP.NET Core.
ASP.NET Core MVC provides a patterns-based way to build dynamic websites that enables a clean separation of concerns. It gives you full control over markup, supports TDD-friendly development and uses the latest web standards.
For database connectivity, you can use entity framework core, for simple crud applications.
Dapper is also a good idea if you want to write your own queries.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Over the next two years we will be building a large Angular 2 application. Part of the test suite will be User Interface Tests. The Unit Tests and Integration tests will be written in C# with NUnit or MSTest. The client has chosen Selenium for the User Interface Tests. Is it possible to write tests for Selenium in C# that can test the Angular 2 User Interface or will Protractor need to be used? I would like to have all the tests run during a Team City build. Can Protractor be run in Team City? If so what does the setup of Protractor look like in Team City?
You can use whatever you like, but Protractor is preferred way since it has builtin Angular 2 support.
There are couple of useful reporting plugins (they provide TeamCity compatible output i.e. you will see failing test names and total number of tests): karma-teamcity-reporter for pure Jasmine tests and TeamCityReporter from jasmine-reporters for Protractor tests.
Both Protractor and Jasmine tests can be run in TeamCity.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm a starter in web developing, weak at php-js-css but have c# experience.
For a new website project I want to use c# but have some problems with the view.
I won't use those standard-looking webform controls that I use for desktop apps, I need a better and modern appearance, a "Bootstrap-like view" for webform controls.
My goal is:
To be not having to learn js-css in detail for this website project, since it will take extra time for me to learn these. I want to solve this problem with c# compatible and easy to use tools / frameworks if possible.
For this purpose:
can I use a such a recommended framework class with c#,
or could just a css template do it,
or is there a 3rd simpler way
It is important for me to choose the right way before I start the project, any help is appreciated.
You absolutely can. You need to use javascript or typescript for the UI and then use Asp.Net WebApi to do any of the server-side functionality. Any of the popular javascript frameworks play very well with WebApi as long as you create the endpoints the correct way.
Here are some tutorials that can help get you started:
Hands On Lab: Build a Single Page Application (SPA) with ASP.NET Web API and Angular.js
AngularJS CRUD Operations with WebAPI, EF and Bootstrap
ASP.NET Web API application with Angularjs Forms and Bootstrap
Creating your first SPA Application using AngularJS and WebAPI – All CRUD Operations
Pluralsight also has a number of video tutorials that are well worth the cost if you can afford it.
Hope that helps.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I need do some performance tests over a solution that uses: WCF services, serialization and a lot of stuff more (framework 4.0) deployed on several machines.
using a visual studio 2010 test project, would be possible configure any option to point at the different machines where the solution is installed?
would WCF cause any problem if I try to test agains it using a binding in particular?
I would create a test project, add references to the WCF services you want to test, and simply start testing. If you want something for complete end to end performance testing you can look at Microsofts Performance Testing suite (You can use this to load/stress test etc...)
What you are looking for is called "Lab Management". Those features are built in to Team Foundation Server on Visual Studio 2010 and newer.
Depending on how complicated of a a setup you want to do you may need a server running Hyper-V and a license for System Center Virtual Machine Manager (SCVMM) (it is not cheep).