How to automate CA mainframe screen validations using selenium? - validation

We have an API where, if i enroll some data it will reflect in mainframe system, i need to validate few details using selenium testNG framework..Could anyone help me on this?

Selenium is a Web Browser UI validation framework. If you are trying to validate api, then selenium is not going to be the right tool for you. You could look into SOAP UI or you could build your own custom api validation framework that hits an api endpoint, serializes it to an object and then validates the response values based on what you expect the response to be. I've also built hybrid frameworks where, I manipulate the browser via selenium and then at one point in the test I have to call an api to validate that another application was updated. But you wouldn't use anything from the selenium libraries for api validation.

Selenium is used to test GUI. If you want to implement API testing, you can use RestAssured framework if you like to code or SoapUI.

Related

How can I implement frontend in API without using a framework?

hope you are having a great day.
I will get straight to the point, I have an application in Spring. I am using API calls from postman to retrieve my data.
Now I am asked to implement a front-end but without a framework, I was told that only ajax and javascript should do the trick.
How would I be able to implement this?
Keep in mind it is not an MVC application, but rather an API.
Thanks in advance
Several ways of doing so ! You can use
Javascript
Jquery
Angular JS
Check if below article helps
How to call a REST web service API from JavaScript?

Making AJAX call from chrome extension to Meteor web app

Hi I have made a web app to practice Meteor and am now trying to make a companion chrome extension. I am having difficulty finding resources on how to make AJAX calls to my meteor app/mongodb.
An example of what I am trying to do is find specific words on a webpage and search them in my mongodb.
Any resources or information on how to best do this would be appreciated.
I suppose you know how to make Ajax call from client. So you are having difficulty in building a REST API in Meteor. Although it is not recommended to build a REST API with Meteor, you can still do it. If you use case just require a REST API and does not have much to do with reactivity, I think you should not go with Meteor, just Node and Express should be fine.
But if you really want to use Meteor, here is the solution: Meteor has a package named webapp which let you handle HTTP requests, that is enough for building a simple REST API. If you API is more complex, check out this community package nimble:restivus it has a better API and useful functions

Mongolab API with ajax

I'm trying to build an app with comment system and wanna know if
is there any safe way to use the mongolab api without share my key with everyone?
if not what you guys recommend to use instead of mongolab api key with ajax.
Thanks.
Unfortunately there is no way to use the mLab Data API with Ajax and keep the API Key safe. We recommend implementing your own RESTful API server on top of your mLab database that can act as a gatekeeper to the database. Your client application would then make Ajax requests to the API server.
Although this tutorial uses Angular instead of Ajax, here is a good example of the architecture I've described: https://devcenter.heroku.com/articles/mean-apps-restful-api.

What is the Best way to consume a RESTful API: jQuery.ajax versus .NET4.0 HttpClient

I am developing a client to access weather information from a RESTful API (http://api.worldweatheronline.com/free/v1/weather.ashx). I am using ASP.NET MVC4 and i have two choices as of my limited knowledge.
using jQuery.ajax({....});
using .NET4.0 HttpClient.
The API requires a key parameter key=xxxxxxxxxxxx as part of the request, and i do not want to reveal the key to the users of the site.
Please guide me someone and also let me know if there are some best practices/standard way of doing this?
If you don't want to reveal the key to users of the site, then you have no choice but to use HttpClient from within your ASP.NET web site. If you allow the call to be made by jQuery in the client browser then it is impossible to hide that key.

Using MvcMailer in non-MVC project

I have a windows service that is supposed to send e-mails periodically.
Next to the windows service project there is an MVC 3 project that is sending e-mails with MvcMailer (beautifully).
I want to use the same engine to send e-mails for the windows service.
How should I do it?
Import the MVC binaries and create one controller and new views for this purpose? Will it work?
Saving it in the database and requesting my web project to send the e-mail might not be the best solution because the information is the result of a query and is too big to be sent in the request.
The only other option I see is to simply request the web project to do all the work but this way it wouldn't be beneficial to place the windows service in another service to save the site application resources.
How would you do it?
As an alternative to MVC Mail, ActionMailer.NET can now be used stand-alone outside of MVC.
The details are covered here
http://geeksharp.com/2011/07/06/actionmailer-0-6-released/
I would argue that calling a mvc mailer from the service might be an overkill. If the mvc project is supposed to expose sending the email API for all of your other solutions, then building a REST api might make sense. However, if you just want to bring the functionality of the action method to the windows service, then i would choose an in-process functional component. If you can refactor the logic of the mvcmailer action method into another assembly why not just do that and then include that assemlby as a depedency in your windows service solution.
If you can provide the over all purpose of the mailer and how it's used in the web scenario, it may help us to provide a better architecture.
Why do you think the query to send to mvcmailer us too large? If you have the mailer MVC project already working and exposed via a restful URL, that becomes your email service and simply call it as a web request from your service.
You can get around size constraints in your request That shouldnt be an issue.

Resources