Friday, January 25, 2019

Continuous Integration

Continuous Integration 

Continuous Integration (CI) is the process of automating the build and testing of code every time a team member commits changes to version control. ... CI emerged as a best practice because software developers often work in isolation, and then they need to integrate their changes with the rest of the team's code base.

CI is devops software development practice where developers regularly merge their code changes in central repository after which automated builds and tests are run.

 

Advantage of CI
improve quality
early bug finding
reduce time to validate n release app updates
fast feedback on changes

 

Tools used for CI

TFS, Jenkin, Azure

 

Team Foundation Server aka TFS is a Microsoft product which is serves as a SCM tool like Git. It also has features like reporting, project management, automated builds, testing and release management capabilities. It covers entire lifecycle, and enables DevOps capabilities. TFS can be used with numerous IDE including Visual Studio and Eclipse on all platforms.

It also provides the features of implementing both CI and CD. It has the feature of Build Management which includes build process management and automating build triggering. It supports good number of automated build triggers such as scheduled build, Continuous Integration trigger, trigger, etc

Bamboo

Bamboo is a continuous integration (CI) server that can be used to automate the release management for a software application, creating a continuous delivery pipeline.

Jenkins 
Jenkins is an open source automation tool written in Java with plugins built for Continuous Integration purpose. Jenkins is used to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build

Team City

TeamCity is a Java-based build management and continuous integration server from JetBrains. It was first released on October 2, 2006.TeamCity is commercial software and licensed under a proprietary license. A Freemium license for up to 100 build configurations and 3 free Build Agent licenses is available.

Difference between Jenkins and TeamCity

Both Jenkins and TeamCity are continuous integration tools that serve many of the same purposes. Jenkins is an open source tool, while TeamCity is a proprietary offering from JetBrains.

The big difference between Bamboo vs Jenkins is that Jenkins is Open Source – it's free. Integration with JIRA and Bitbucket is limited. ... There are only 100 Bamboo plug-ins in the Atlassian environment compared to Jenkins which has over 1000.

note:  All references taken from google.  

Thursday, January 24, 2019

Open source Tools

selenium (ref taken wikipedia)

Selenium is a portable framework for testingweb applications. Selenium provides a playback (formerly also recording) tool for authoring functional tests without the need to learn a test scripting language (Selenium IDE). It also provides a test domain-specific language (Selenese) to write tests in a number of popular programming languages, including C#GroovyJavaPerlPHPPythonRuby and Scala. The tests can then run against most modern web browsers. Selenium deploys on WindowsLinux, and macOS platforms. It is open-source software, released under the Apache 2.0 license: web developers can download and use it without charge.

Jenkins ( reference by Google)
Jenkins is an open source automationtool written in Java with plugins built for Continuous Integration purpose.Jenkins is used to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build

Maven (reference google)
Apache Maven provides support for managing the full lifecycle of a test project. Maven is used to define project structure, dependencies, build, and test management. Using pom.xml(Maven) you can configure dependencies needed for building testing and running code

Junit
JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is collectively known as xUnit that originated with SUnit

TestNG
TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use, such as: Annotations. Run your tests in arbitrarily big thread pools with various policies available (all methods in their own thread, one thread per test class, etc...).TestNG is an open source automated testing framework; where NG means NextGeneration.

Wednesday, December 19, 2018

Test Complete /UFT- Automation of Database

dim objconnection
set objconnection= Createobject("Adodb. co nection)

'function to connect sql server
public function opendbconnection()
aqutils. delay 3000
strcoonectionstring="provoder=sqloledb;datasourcee=strdatasourceval;initial catalog=strcatval;security=sspi;persist security info=true"
objconnection. open strcoonectionstring
if objconnection. state=1  then
   log. message "DB connect"
else
Log. message "Db not connect"
end if
end function

'function to close db connection
public function closedbconnection()
objconnection. close
if objconnection. state <>1  then
   log. message "DB connection close"
else
Log. message "Db not connection not close"
end if

end function

dim strcodedelimiter, strDBrowdelimiter
strdbrowdelimiter="@@"
strcodedelimiter="|"

public function get_db_row()

dim objrecordset, strdbrow
strdbrow=""
if objconnection. state=1 then
    set objrecordset =createobject (adodb. recordset")
    objrecordset. activeconnection=objconnection
   objrecordset. open DBquery, objconnection
   if not objrecordset. eof then
    while not objrecordset. eof
         for intdbcolcounter=0 to objrecordset. fields. count-1  step 1
               strcurrentvalue=objrecordset. fields(intdbcolcounter). value
          if isnull(strcurrentvalue) or strcurrentvalue ="" then
           strcurrentvalue =Null
          end if
strdbrow=strdbrow & strcodedelimiter & strcurrentvalue
next
strdbrow= strdbrow & strdbroedelimiter
objrecordset. movenext
wend
if left(strdbrow, 1)=strcodedelimiter then
    strdbrow =right(strdbrow, len(strdbrow) - 1)
end if
strdbrow =replace(strdbrow, strdbrowdelimiter & strcodedelimiter, strrowdelimiter)
objrecordset. close
set objrecordset =nothing

else
    log. message "no data found"
end if
get_db_row= strdbrow

else
     log. message "db connection fail"
end if

end function

'function to update db row
public function uodate_db_row()
dim objrecordset, strdbrow
strdbrow=""
if objconnection. state=1 then
    set objrecordset =createobject (adodb. recordset")
    objrecordset. activeconnection=objconnection
   objrecordset. open DBquery, objconnection
   if err. description <>"" then
          log. message "no data found in db"
    else
bdbflag=true
end if
else
bdbflag=false
log. message "db connection failed"
end if
update_db_row=bdbflag

end function

'function to compare db value
public function comparedbvalue(strvalidatiinval, strdbvalue)
dim bdbvalflag
if aqutils. vartostr (strvalidatiinval) =aqutils. vartostr (strdbvalue) then
   bdbvalflag=true
else
bdbvalflag=false
end if
comparedbvalue=bdbvalflag
end function

Test Complete / UFT-launch window application

Test Complete
Dbgservices object is only available if dbgservices plugin is installed.
set proc=dbgservices. launchtestedapplication(strapppath)
Res=proc. exists
if Res then
     log. message ("App launch successfully")
else
log. message (" app not started")
end if

UFT
systemutil.run strapppath