# PiTest Plugin For Intellij ## Initoption Setting - Step1: Plugin Download (Plugin name :PIT Mutation Testing)  - Step2: choose Edit Configurations  - Step3: create a new VM,select the PIT Runner  - Step4: setting your current VM Options,and Run it  --- ## How to use - Step1: 右鍵點選要測試的類別 -> 可以選擇整個Module或是單一類別  - Step2: 承Step1,點選後,會自動跑測試,報告會依照設定的路徑產出以及顯示測試覆蓋率  - Step3: 選擇index.html即可看到報告產出結果  --- ## Report Introduce #### ==index==  #### ==detail==  ### ==comment== - source code  --- ## Comment - PiTest有提供諸多客製化設定,簡略舉例如下: - reportDir -> 報告產出目錄 - targetClasses -> 測試目標類 - threads -> 自定義執行緒數量 - historyOutputLocation ->歷史紀錄目錄位置 - 官網提供設定範例 ``` grovvy java -cp <your classpath> \ org.pitest.mutationtest.commandline.MutationCoverageReport \ --reportDir c:\\mutationReports \ --targetClasses example.foo.* \ --sourceDirs c:\\myProject\\src \ --targetTests example.foo* --threads 2 --excludedMethods hashCode,equals ``` - Intellij有提供Plugin,其中可以將原先要寫在build.gradle或pox.xml裡面的資訊,改以parameter方式設定,並以,隔開.範例如下  - Document Source -> https://pitest.org/quickstart/commandline/
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up