Posts

Swagger User Interface

Image
Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place. It’s automatically generated from your Swagger specification, with the visual documentation making it easy for back end implementation and client side consumption. Swagger UI https://github.com/swagger-api/swagger-ui.git XAMPP https://www.apachefriends.org/xampp-files/7.1.7/xampp-win32-7.1.7-0-VC14-installer.exe Copy the Swagger UI master zip into httdocs Click on the XAMPP Control Start the Apache from the XAMPP Control start on port 80 http://localhost/swagger-ui-master/dist/

Swagger Editor

Image
Swagger  is the world's largest framework of API developer tools for the OpenAPI Specification(OAS). It is used for Creating the REST API How to Setup Swagger Editior using XAMPP Swagger Editor  https://github.com/swagger-api/swagger-editor.git XAMPP https://www.apachefriends.org/xampp-files/7.1.7/xampp-win32-7.1.7-0-VC14-installer.exe Copy the Swagger Editor into httdocs Click on the XAMPP Control Start the Apache from the XAMPP Control start on port 80 http://localhost/swagger-editor/#/ We can see REST API Document we can edit our swagger editor.

Sikuli Automation Suite

Image
Sikuli a GUI based automation tool http://www.sikuli.org/ It can really automate what you can see on your screen. Example to open a browser and search in google a traditional example but this any web Automation does. What more it can do is the real interesting question that we can see. It can automate any software which regular web automation tool does not cover like selenium  and other automation tool eg QTP. Sikuli what programming language it runs an interesting question.  It core scripts are written in Python. So Next Big question comes to us should we learn python. I got some answer which sound logical to me after tying the Scripts. What Effective Python Programming you need to know for using in Sikuli Scripts Python on Sikuli Control Statements For File accessing Data set accessing ( You can create you data set for your test suite in CSV and use python to parse through) No Python Knowledge needed for using the IDE as given below Sikuli IDE provide...

Simple Excel to Test your Web API Testing Automation and Regression

Image
Excel macro we use the HTTP function to make call and also log the responses to the Excel. Excel can we used for Analytic and also for the Analyzing the Statistics. Macro Test Sub Test() Dim strXML, strResponse, count Set XMLHTTP = CreateObject("MSXML2.XMLHTTP")     count = Application.WorksheetFunction.count(Range("A:A")) + 3 'MsgBox (count) For i = 4 To count If Cells(i, 4) = "" Then myurl = Cells(1, 2) + Cells(i, 3) Else myurl = Cells(1, 2) + Cells(i, 3) + "?" + Cells(i, 4) End If 'MsgBox (myurl) XMLHTTP.Open Cells(i, 2), myurl, False XMLHTTP.setRequestHeader "signatureSecret", Cells(1, 4) XMLHTTP.send Cells(i, 8) = XMLHTTP.getAllResponseHeaders() Cells(i, 9) = XMLHTTP.getResponseHeader("signatureSecret") Cells(i, 6) = (XMLHTTP.responseText) Cells(i, 7) = (XMLHTTP.Status) Next i End Sub You use Excel function to Compare the Expected Result

Apache CXF Interceptor

Initialize the CXF Interceptor Main Features public class MainFeature extends AbstractFeature { @Override protected void initializeProvider(InterceptorProvider provider, Bus bus) { PhaseInterceptor<Message> interceptor = null; // Audit interceptors interceptor = new SecurityInterceptorIn (); provider.getInInterceptors().add(interceptor); provider.getInFaultInterceptors().add(interceptor);    } } CXF Interceptor Creation Extend the AbstractPhaseInterceptor public class SecurityInterceptorIn extends AbstractPhaseInterceptor<Message> { @Override public void handleMessage(Message message) throws Fault { String msg = null; String requestURL = (String) message.get(Message.REQUEST_URL);   } } Initializing the JaxRs @ApplicationPath("/fe") public class JaxRsApiApplication extends Application { @Inject private PersonServiceImpl personServiceImpl; @Override public Set<Object...

Drools Dynamically Load

Load Drool File from location Method to Dynamically Load the Drool File and create the Knowledge Base public static KnowledgeBase readKnowledgeBase(ClassLoader loader) throws Exception { KnowledgeBuilderConfiguration kBuilderConfiguration = KnowledgeBuilderFactory .newKnowledgeBuilderConfiguration(null, loader); System.out.println(kBuilderConfiguration); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(kBuilderConfiguration); KieBaseConfiguration kbaseConfig = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(null, loader); // kbuilder.add(ResourceFactory.newByteArrayResource(getRule().getBytes()), // ResourceType.DTABLE); kbuilder.add( ResourceFactory.newFileResource( "C:\\Eligibledt.xls" ), ResourceType.DTABLE); KnowledgeBuilderErrors errors = kbuilder.getErrors(); if (errors.size() > 0) { for (KnowledgeBuilderError error : errors) System.err.println(error); throw new Ill...

Drool Decision Table

Image
How to Define a Decision Table in drools Rule Set Where you import the Model Rule Table CONDITION         EXPRESSION ACTION      Perform Data