Sunday 5 January 2014

PyThon Language - Automation Testing

1 . Basic Python  (Python version 3.3)
     *Install software
       + install Python from  www.python.org will support basic libraries : print() , if  else , and , os ....
       +install framework in Windows OS from  www.python.org/windows/  will include WinAPI , COM..
      When you use Python in  Windows We should install  python and framework  in Windows
   * Example  uses basic functions  in python
       + print("")
       
       + printf  in C++

2. How to create module and class in python
    +
3 . utils.py  will create  module 
     +registry
     +string
     + service
     +filesystem
     +Windows OS information

4 . Python use to write automation testing .
    + Why do we use Python to write  automation testing ?
    + How to do  ?

5 . Input data from xml file
    We can use xml file or ini file to input data
    + from  xml file
    +from   ini file
6. Report the result  .
  + export  Excel  file  .
  + export xml file or log file

7.  How to fix Some errors in Python language .
.
8 . Code demo and example .
.
9 .Import py file from another directory.










                                                       
#python version 3.3
#File.py
def  Test():
  print("hello world")

#python version 3.3
#TestCase1.py
import os
import sys
currentFile = os.path.abspath(__file__)
position =  currentFile.find("Test")
pathOfLib = ""
if position > -1 :
    pathOfLib = currentFile[0:position+4]
pathOfLib  = pathOfLib +"\\utils"
sys.path.insert(0, pathOfLib)
import File
File.Test()

10  Python on Linux
  +  Run py file on terminal on  linux OS
             python name.py
  + get  current version of  python
            python -V

11. Running Python when Building  event on eclipse.
http://www.vogella.com/tutorials/Python/article.html

http://www.vogella.com/tutorials/GoogleAppEngine/article.html


10 . good links
https://computing.llnl.gov/tutorials/parallel_comp/

11 Connect to Data Base

11 http request
http://www.tutorialspoint.com/python/python_database_access.htm
Download : https://pypi.python.org/pypi/MySQL-python/
http://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html
                                                                                                           Ho Chi Minh   2014
                                                                                                                  Thong LT
=======================================================================
http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/
      http://www.whit.com.au/blog/2011/11/reading-and-writing-csv-files/http://www.whit.com.au/blog/2011/11/reading-and-writing-csv-files/
http://www.ucs.cam.ac.uk/docs/course-notes/unix-courses/pythontopics/csv.pdf
makeFile on windows OS
http://bojan-komazec.blogspot.com/2011/10/how-to-use-nmake-and-makefile.html
http://www.blog.pythonlibrary.org/2010/09/09/getting-remote-drive-space-on-windows/
http://code.activestate.com/recipes/115875-controlling-windows-services/
http://code.activestate.com/recipes/langs/python/tags/meta:requires=win32service/
 winDesktop
http://pydoc.net/Python/RSFile/1.1/rsbackends.raw_win32_defines/
http://www.brunningonline.net/simon/blog/archives/winDesktop.py.html
http://msdn.microsoft.com/en-us/library/ms235639(v=vs.80).aspx


http://c2.com/cgi/wiki?UsingNmake
http://www.python.org/download/releases/
http://msdn.microsoft.com/en-us/library/f35ctcxw.aspx
http://msdn.microsoft.com/en-us/library/f35ctcxw.aspx
demo
http://www.tutorialspoint.com/python/python_functions.htm
compile c++ file on windows with command
http://docwiki.embarcadero.com/RADStudio/XE5/en/Compiling_a_C%2B%2B_Application_from_the_Command_Line
http://msdn.microsoft.com/en-us/library/ms235639%28v=vs.80%29.aspx

http://stackoverflow.com/questions/19689652/unable-to-find-vcvarsall-bat-python-2-7

3 comments:

  1. Really amazing blog.Thanks for sharing

    qtp online training

    ReplyDelete
  2. Hi All,
    All of you are welcome. Please go current website at http://104.197.9.103/

    Thank You
    Thong LT

    ReplyDelete
  3. Really Thanks For Sharing Such an Informative Post....

    Plots For Sale in Vizag

    ReplyDelete