• 軟體品管專業課程簡介

    這篇文章主要說明,軟體品管的專業領域可以進階發展的方向。不管你是 RD,長年累月的寫程式、熟悉系統架構。或是QA對於目前不斷執行重複性的測試工作,不知道專業如何發展,可參考這些領域。有系統有計畫的學習,培養相關的專業知識。筆者歸納的六大主題。也是筆者在2014/2015 所開設的軟體專業課程。

    QA Courses

    1. 資料庫與網站效能

    這個主題很廣泛除了效能測試、建立一定的測試基準,測試完之後,針對測試的結果進行分析,並且做效能調教。調教的範圍包含網頁前端、作業系統(Windows , Linux)、資料庫 (MS SQL, MySQL)的效能調教與程式語言 design best practices 等子議題。

    2. 網路封包分析

    透過網路封包分析可以得知網路效能慢的原因、網路遭遇的資訊安全問題、應用程式資料間傳遞的除錯。網路封包分析可以回答的問題像是:到底是 Server 、 client端 還是網路有問題?

    網路內部有大量莫名攻擊行為,這些攻擊的來源為何? 透過什麼方式攻擊?

    3. Troubleshooting

    除錯是QA 也是Developer 一個很重要的技能。這個課程也延伸一些子議題包含 Windows 除錯的工具、Linux 除錯與資料庫除錯等。

    4. 病毒與未知程式碼分析

    當遇到一個可疑或是未知的檔案的時候,要如何做初步的分析。判斷該檔案的行為。

    當該檔案有可能是病毒時,應該如何進行檔案分析技巧。

    當該檔案的原始程式碼不見的時候,如何也能進行初步的邏輯分析,大致了解該程式如何運作

    讓不需要懂組合語言的人也可以做分析!

    5. 自動化測試

    自動化測試包含的子議題也很廣。包含 selenium、Python、與JMeter 等,如何運用這些工具達到更有效率的測試執行,是這個課程的重點!

    6. 網站安全測試

    網站的安全防護、資訊安全測試與防護。資訊安全測試特別對於電子商務、金流相關、帳戶密碼相關的網站特別重要。如何在上線前做基本的測試與防護,以避免公司與客戶商譽的損失,是這個課程的重點。

    參考各課程綱要如下,如有興趣,歡迎來信告知。五人以上即可開班。

    Web Security Testing

    Objective

    Top 10 web security and vulnerability verification and testing.

    Security Issue prevention through development life cycle.

    課程大綱

    • Top 10 Web vulnerability
    • Secure Software Practices through SDLC
    • Manual testing by Browser addon
    • Automation Testing (ZAP, Vega)
    • Prevention
    • Web Log analysis
    • Case study
    • Security testing reporting

    Network Forensic by WireShark

    Objective

    Network issue identification from the packets

    Identify potential Security issue

    課程大綱

    • WireShark uses and analysis
    • Network capture and network segment
    • Network protocol (TCP/IP/HTTP/DNS)
    • Suspicious traffic
    • Identification of Network slow issue
    • Hacked Network packets forensics

     Windows Troubleshooting by SystemInternals

    Objective

    Identify root/cause of Windows issue (leak, hang or crash.)

    Performance issue monitoring and analysis

    課程大綱

    • Windows architecture (thread, process, job. System process)
    • how to identify malware and suspicious process
    • How to identify the performance issue for Windows application
    • Crash, leakage, hang issue root/cause analysis
    • Windows system internals tools usage
    • Case study

     Performance Testing by Jmeter

    Objective

    Web service performance load/stress testing by Jmeter

    Windows/Linux key performance metrics monitoring and tuning.

    課程大綱

    • Performance tools/ metrics
    • Performance analysis for CPU, Memory, Disk and network
    • Tuning options for apache, mysql and linux
    • Windows Performance Tools (ProcessMon, ProcessExplorer Perfmon)
    • Linux Performance tools (Top , iostat, vmstat )

    Web Service Automation testing by selenium/python

    Objective

    Web UI Automation testing/operations by Selenium

    課程大綱

    • Web UI testing /operation automaton by Selenium/python
    • How to complete the automation “without” coding.
    • Prepare the selenium coding environment
    • your 1st automation scripts
    •  handing of complex Web UI (i.e. Ajax, alert)

    Malware Analysis

    Objective

    Suspicious file or malware analysis

    課程大綱

    • Malware type (EXE, DLL, DOC/PPT)
    • Malware static analysis
    • Malware dynamic analysis
    • Reverse Engineering

    Reverse Engineering By IDA

    Objective

    Identify suspicious behaviors

    Identify the program logic of EXE

    課程大綱

    • Basic Uses of IDA pro
    • CrackMe case Study
    • DLL injection case study
    • Downloader Case study
    • Key Logger Case study
    • Http connection C&C Case study
    • OS/VM detection Case study
    • User mode rootkit case study
    Jpeg

    Jpeg

    Tags: , , , , , , , ,

  • Selenium 29.03.2015 No Comments

     How to handle unicode in Python?

    In this article, we will demo the key tips to handle the unicode issue in python.

    Take this website as an example, http://shopping.pchome.com.tw/

    If we click the search button without any input character, it will show warning alert with Chinese Characters.

    How do we capture and verify if the alert message in Chinese is what we expect?

    First, we need to define the encoding utf-8 in the very beginning.
    #-*- coding: utf-8 -*-

     

    Then, we save the alert message by using switch_to_alert()

    # switch to the alert
    alert = self.driver.switch_to_alert()
    
    # get the text from alert
    alert_text = alert.text

     

    Finally, we compare if the alert text equals what we expected. What need to mention here is that we convert both desired and expected text into unicode.

    This can be optional in python 3.0, but it’s a required in python 2.7.

    self.assertEqual(u"請輸入查詢關鍵字", unicode(alert_text))
    
    

     

    #-*- coding: utf-8 -*-  
    
    from selenium import webdriver
    import unittest
    class CompareProducts(unittest.TestCase):
        def setUp(self):
            self.driver = webdriver.Firefox()
            self.driver.implicitly_wait(30)
            self.driver.maximize_window()
            self.driver.get("http://shopping.pchome.com.tw/index/")
    
        def test_compare_products_removal_alert(self):
            # get the search textbox
            search_field = self.driver.find_element_by_id("keyword")
            search_field.clear()
            search_field.send_keys("")
    
    
            # click the button
            SearchButton = self.driver.find_element_by_id("doSearch")
            SearchButton.click()
    
    
            # an alert to the user
            # switch to the alert
            alert = self.driver.switch_to_alert()
    
            # get the text from alert
            alert_text = alert.text
            # check alert text
            print "alert.text = " + alert_text
            # 程式開頭記得加入,否則會無法用中文註解  #-*- coding: utf-8 -*-  
            # 在Python3因為字串已經全部統一成 unicode ,所以不必加上 u ,這是Python2和Python3的重要差別之一,需要特別注意
            self.assertEqual(u"請輸入查詢關鍵字", unicode(alert_text))
            # click on Ok button
            alert.accept()
    
        def tearDown(self):
            self.driver.quit()
    
    if __name__ == "__main__":
        unittest.main()
    How to Handle Unicode

     

    Tags: ,

  • 3-Step to generate Python Unit Test HTML Report?

    In this article, we will share how to generate your python unit testing results in HTML format.

    Here is the example of the testing reports. Generating testing report in HTML format will help others to read and share the testing results.

     

     

    UnitTest_HTML

     

    Step 1: Download the HTMLTestRunner.py

    http://tungwaiyip.info/software/HTMLTestRunner_0_8_2/HTMLTestRunner.py

     

    Step 2: Python Code Sample

    import unittest
    import HTMLTestRunner
    
    
    ... define your tests here...
    
    
    if __name__ == '__main__':
    
    
            HTMLTestRunner.main()
    Testing Results in HTML


    Step 3: Execution 

    Assuming the file name of python source code is “yourTestingPython.py” and the expected HTML testing results is “TestingResults.HTML”

    Python    yourTestingPython.py   >   TestingResults.HTML

     

     

     

    Tags: ,