Skip to main content

Posts

Showing posts from 2019

Automation Testing

What is Automation Testing :- Automation testing is used to simplify testing and involves steps to create scripts for testing. One of the advantage of automation testing is re-executing same test case in different environment so it saves time. There are many tools available to prepare automation test cases some of them are Selenium IBM Rational Test Case Studio

What are requirements companies look in Software Testing Engineer

Software engineer working in Testing (Automation / Manual) should know 1. System Analysis  2. Software Quality Assurance 3. Complete test life Cycle 4. Different testing methodology. 5. Experience in development of different test automation frameworks and tools. 6. Experience in forming different test cases. 7. Coordinating with BA's and Developers. 8. Experience with bug reporting tools. 9. Knowledge of best practices on automation.

Tips for writing a good blog

Tips for writing a good blog 1. USE SEO tips (Use Search terms for title, hyperlinks etc.,) 2. Use Google keywords people often search. 3. Be consistent 4. Check messages and emails on your blogs. 5. Make content sharable. 6. Improve your content repeatedly. 7. Be clear about your each blog. 8. Suggest user's related topic  9. Use images, pdf's presentation links. 10. Make content clickable. 11. Know your audience before starting any blog post or any blog. 12. Show your content to friends/relatives etc before posting if you have fear. 13. See other blogs of same category and write down 5 things which you are doing and others are not. 14. Go to google keyword planner to see no. of hits and suggestions for particular keyword. 15. Ask people for comments on your blog. 16. Link different set of information for your viewers. 17. Embed your blog with your website, quora, social networking sites also post your answers on sites like linkedin etc.

Javascript to change Label dynamically

<!DOCTYPE html> <html> <script> function Test(){ var x=document.getElementById("Test"); if((x.innerHTML).includes("*")){ x.innerHTML=x.innerHTML.slice(0, -1); } else{ x.innerHTML=x.innerHTML+"*"; } } </script> <body> <label id="Test" for="new">My First JavaScript*</label> <button type="button" onclick="Test()" id="new" name="new">New </button> <p id="demo"></p> </body> </html>

Steps to backup Sql server database

Steps for backup and restore sql server db Ensure application server is stopped. Login to Dev Server and launch SQL Server Management Studio  Expand the Databases node in Object Explorer. Right-click on the database, hover over Tasks, and select Back up Select the path and click ok to begin backup restore Ensure application server is stopped Login to server and launch SQL studio. Right click on database and click on restore. Select the .bak file to restore Ensure name of db is same and version of your server is similar before restore starts.

List of Companies in India working on Maximo

List of Companies in India working on Maximo IBM Wipro TCS Infosys Accenture PWC Capegimini Tech Mahindra HCL Mphasis L&T ABS Ontracks Interloc Cybage Ford ValueD Mindtree Volkswagon Cognizant Cisco GE Atos Syntel Adobe Schlumberger Etc. These are major companies although their are others like  1. Zenfocus 2. Cyberjaya 3. Envision

JavaScript functional expresion

Functional expresion is function without name ex Var squareIt=Function(a,b) { Return a*b } Var c=squareIt(4,5) This will only called when we invoke it. If we need immediate invocation then use  Var c=(function (){ Var a=4; Var b=5; Return b*c; }()) You may ask why we use when result is 20 only whel you can have a global value in place of a and b and can use it.

Jquery to make field required based on other Field

<!DOCTYPE html> <html> <head> <title>Try jQuery Online</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $(document).ready(function() {    $("em").addClass("selected");    $("#myid").addClass("highlight");           $('#text1').change(function() {             var x = document.getElementById("label2");                           if (x.innerHTML === "Last Name") {                 x.innerHTML = "Last Name*";             } else {                 x.innerHTML = "Last Name";             }         if ($('#text2').attr('required')) {             $('#text2').removeAttr('required');         }         else {             $('#text2').attr('required','required');         }     });    }); </script> <style> .selected {     color:red; } .h

SQL Server connection refused error

If you face sql server connection refused while connecting sqlserver to eclipse resolution steps are:- 1. Go to server configuration manager. 2. Enable TCP/IP protocol and in IP address go to IP/ALL and set dynamic value to blank and TCP/IP port to 1433 (default)

Getting started with Apache Derby

Derby is free opensource database Install derby and start using bat file startnetwork.bat. C:\Users\AnilBalwani\Downloads\db-derby-10.12.1.1-bin\db-derby-10.12.1.1-bin\lib>java -jar derbyrun.jar ij ij version 10.12 ij> connect 'jdbc:derby:booksdb;create=true'; ij> CREATE TABLE book (book_id int primary key, title varchar(64)); 0 rows inserted/updated/deleted ij> INSERT INTO book VALUES (1, 'New Test'), (2, 'Testing'), (3, 'Correct'); 3 rows inserted/updated/deleted ij> select * from book; 3 rows will get selected

Citi Corp Java Interview Questions

CitiCorp Interview Questions 1. Variable used in Threading (say t1 works on Map, t2 should work after t1 finishes) 2. Circular Linked List. how to check if a list is circular? 3. What is Hashing, what's a bucket in hashing? 4. authentication in Web Servies 5. Get Nth employee salary in Oracle.   6. Explain all the guarantees about the use of volatile keyword in the Java language from version 1.5   7. Sort a array in such a way that the duplicates are also in for ex 2 arrays 0 1 3 5 1 2 3 4 output should be 01123345 9.  spring we use Initialization Bean interface 10, Discuss method overriding in Java? 11. Discuss internals of a Hashmap? What is Role of equals() and hashcode() method in Object class? What will be behavior if we override hashcode() method to always return 1? Solution discussed here What is difference between Future and Callable interface in Java? When should I use StringBuilder class in a program? Tell me about your understanding of Executor Fram

Accenture interview questions for 4 year experience

Where java uses encapsulation What is polymorphism Explain system.out.println How JVM works How to manage outofmemoryerror How to handle error in Java What's is xMS and xmx in Java in case of 2 GB RAM What is default heap size Why segregation is there in error code of webservices Which are required to handle Difference between abstraction and interface Why to use abs where to use Interface What is DI What is connection between di and interface @autowired How to connect to multiple database in hibernate What is threadsafe in hibernate How to handle exception Try with resources closing Where to use finally How to map custom exception What is index Which Algo index uses How does it works Differ between primary key and unique key How to check db performance What is DI How to configure Jenkins Retrospective call in agile How to manage a team Project deployment cycle

SAS PUNE JAVA INTERVIEW QUESTIONS

1. How to delete multiple data using Rest API? 2. What is aggregation, Inheritance and Composition give example? 3. What do you know about OOAD, SAS Analysis and BI tools? 4. What is a servlet? 5. What is Hibernate? 6. What is Spring? 7. Tell us about Spring Workflow?

Maximo Automation Script with Ldap

Hi Today we are going to connect to LDAP and query Ldap's data using Maximo Automation Script Steps:-  1. Define Ldap Attributes 2. Create a hashtable and put those attributes 3. Create a Context 4. Create a Search Control 5. Search using Context and Search Control 6. Loop through results and get required ldap attribute using criteria defined. *************************************************************************** from javax.naming import * from java.util import * from javax.naming.directory import * from psdi.mbo import SqlFormat / /Step 1  print "Starting Ldap querying from Maximo" ldapurl="ldap:serverurl:port" ldapuser="XXXX" ldappassword="XXXX" ldapbasedn="DC=something,DC=com" //Step 2 ldaptable=Hashtable() ldaptable.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory") ldaptable.put(Context.PROVIDER_URL, ldapurl) ldaptable.put(Context.SECURITY_AUTHENTICATION, "simpl

Unix Script to check if the file exist or not in folder

check_empty() { count=`ls \home\myfolder  | wc -l` echo "count is " echo "$count" if test count -eq 0 then    echo "Folder is empty"    set err_msg = " FOLDER is empty..."    echo $err_msg    set sys_errs = "Y"    exit 1 else  echo "source folder is not empty folder" fi } #**********************************************************************# #** MAIN PROGRAM ******                                                #********************************************************************** check_empty()

Sending Email via Unix Script

to send email fromadmin@gmail.com to test@gmail.com we can use below short script Mail.ksh echo "Hi Sending you this email for information you that you are promoted now you become a father" | mailx -r _fromadmin@gmail.com -s "Email is generated and send to " test@gmail.com

What is IOC Container

It is a generic term used in Spring framework. Since we know Spring framework get control from class which needs dependency i.e Inverison of Control. So all this happens in IOC Container. Important IOC Container is ApplicationContext whose you we saw in Hello World Spring Framework Application. Spring IOC container is very important as it will create object and configure them. Types : 1. Bean Factory             2. Application Context Container

What is Spring Framework

What is Spring Framework? Spring is an open source framework and inversion of control for Java Application. Spring is dependency injection framework. In an enterprise application many classes depend on many classes where we can take leverage using this framework by injecting this dependency. Example consider we have a pizza process for creating pizza Class Pizza{ Pizza(){ ……………….Steps for Making Pizza } } Lets say we have OnlineRestaurantService{ CookService cs=new CookService(Pizza) } Here we are passing pizza dependency to CookService in OnlineRestuarantService class. In future we can pass Hotdog service also in place of Pizza. So this all can be done by Spring Framework. How can we let CookService know to inject pizza as dependency or Hotdog as dependency. Well using annotations 2 popular annotations are @component and @Autwired @component tells manage OnlineRestuarantService dependency and @autowired tells you need to look for

Spring Error Spring cannot find bean xml configuration file org.springframework.beans.factory.BeanDefinitionStoreException

Error:  Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException Well what you could do is put your bean xml file outside your package since frameword is looking it inside package. path ApplicationContext context = new ClassPathXmlApplicationContext("src/main/resources/beans.xml"); Else give path inside package example

Getting Started with Spring Framework

Path for learning spring is 1. Spring framework. 2. Spring MVC 3. Spring Boot Before beginning to what is Spring Framework we will learn what's the library to get all help from. http://Spring.io it is a library where u can find all help documents, extensions related to spring. What is Spring Framework? Spring is an open source framework and inversion of control for Java Application. Spring is dependency injection framework. In an enterprise application many classes depend on many classes where we can take leverage using this framework by injecting this dependency. How to setup Eclipse for Spring 1. Download Jdk 7 or 8. 2. Download Eclipse. 3. Download CommsApache jar https://commons.apache.org/logging/ 4. Download Spring jars https://repo.spring.io/release/org/springframework/spring/5.0.0.RELEASE/ (download dist.zip) 5. Create a new Java Project and add CommsApache.jar and Spring jars. Create Structure like below Main class package com.it.He

Unix Script for Practice

1. Write a script to connect to database and select data. 2. Write a script to pass server details and folder structure and schedule it run daily and send data over FTP it should be generic and reusable. 3. Write a script to monitor cron table in Unix and update it at run time.

Unix Crontask every 5 minutes Unix crontask run every 30 Minutes Unix crontasak Every day

Unix Crontask every 5 minutes Unix crontask run every 30 Minutes Unix crontasak Every day For Scheduling unix Crontask to run every 5 minutes */5 * * * * For 3 Minutes */30 * * * * Format Minute  Hour  Day of Month Month Year / per * is every - is range of value so * * * * * Is every minute For 12 Hour 5 minutes in August (12:05) 5 0 * 8 * For At 10:00 on every day-of-week from Monday through Saturday. 0 10 * * 1-6

Checking logs in Linux

Linux logs can be viewed /VAR/LOG directory this contains plain text text files. You can view logs using ls command. You can also view logs via  dmesg,  which prints the kernel ring buffer. It prints everything and sends you to the end of the file. From there, you can use the command  dmesg | less  to scroll through the output.

Linux checking users information

The /etc/passwd file contains a list of all the system user accounts, along with some basic configuration information about each user.  Anil:Test@123:501:501:Anil Kumar:/home/anil:/bin/bash Each entry has seven data fields, with each field separated by a colon. These fields are: The username The user's password The user's system user ID number The user's system group ID number The user's full name The user's default home directory The user's default shell program

Copying file from One directory to Another in Unix

copy_file{ for file in \MyDrive\MyFolder\   do   echo $file   FILESIZE=$(stat -c%s $file)   echo "filesize " $FILESIZE     if [[ "$FILESIZE" -eq 0 ]]         then            echo "$file is empty.Hence not sending it.Can't Execute further"           exit 1         else          echo "$FILE has data."     fi   echo "Copying File "   cp  $file $Other_Directory } #************Starting Copy File String# copy_file

FTP using Unix Shell Scripting

For doing FTP what u need in unix is Username and password and server path where you are transferring file. send_viaftp(){ ftp -ni $destination verbose user $username $password cd $destinationfolder ascii put $myfile } #Copying file  to server2 destination=server2 destinationfolder=home/test username=test password=tst$888 send_viaftp

Getting started with Unix

chmod +x test.sh this is the command used to make file executable To execute File ./test.sh Date used to get date date Creat a file vi hello.sh inser code esc + I Save code  and quit esc + :wq if file is readonly use :wq! Give access to execute chmod +x hello.sh       or      chmod 755 hello . sh Execute Script ./Hello.sh See what is the content of this file cat Hello.sh Exporting values in Unix for Variables I have a script echo " VAR VALUE IS $VAR1" $VAR1="hello" echo"NEW VAR VALUE IS  $VAR1" output run using ./hello.sh Var value is New var value is hello if you define  $VAR in command prompt before running $VAR = OLDHELLOW It wont recognize this running ./hello and out put will be same run using ./hello.sh Var value is   New var value is hello To make it global we need to export this value using export VAR run using ./hello.sh Var value is  oldhello New var value is