Cov txheej txheem:

Kuv yuav siv NUnit hauv Visual Studio li cas?
Kuv yuav siv NUnit hauv Visual Studio li cas?

Video: Kuv yuav siv NUnit hauv Visual Studio li cas?

Video: Kuv yuav siv NUnit hauv Visual Studio li cas?
Video: Siv Yis Neeb Leej Cawm Seej Music Video Short 2024, Kaum ib hlis
Anonim

Txhawm rau tsim cov ntawv xeem uas siv NUnit:

  1. Qhib cov kev daws teeb meem uas muaj cov cai uas koj xav sim.
  2. Txoj nyem rau ntawm qhov kev daws teeb meem hauv Solution Explorer thiab xaiv Ntxiv> Txoj Haujlwm Tshiab.
  3. Xaiv tus NUnit Test Project template.
  4. Ntxiv ib qho kev siv los ntawm qhov kev sim rau qhov project uas muaj cov lej koj xav sim.

Tsuas yog li ntawd, kuv yuav ua li cas thiaj tau NUnit hauv Visual Studio?

Txhawm rau nruab NUnit3TestAdapter hauv Visual Studio 2017, ua raws cov kauj ruam hauv qab no:

  1. Txoj nyem rau ntawm Project -> Nyem "Manage Nuget Packages.." los ntawm cov ntawv qhia zaub mov.
  2. Mus rau Xauj tab thiab tshawb rau NUnit.
  3. Xaiv NUnit3TestAdapter -> Nyem Nruab ntawm sab xis -> Nyem OK los ntawm Saib Ua Ntej pop up.

Qhov thib ob, kuv yuav ua li cas thiaj li xeem NUnit? Kev daws:

  1. Qhib cmd kom ua tus Thawj Coj.
  2. Nkag mus rau qhov chaw ntawm inDebug folder siv CD hais kom ua.
  3. Hu rau NUnit 2.6.4 Test Runner.exe. Default: “C:Program Files (x86)NUnit 2.6.4in unit-console.exe.
  4. Muab lub npe ntawm LegiTest.dll raws li kev sib cav rau Nunit Test Runner.
  5. Execute hais kom ua.

Tom qab ntawd, ib tus tuaj yeem nug, Kuv yuav siv NUnit test adapter li cas hauv Visual Studio?

Los ntawm sab hauv Visual Studio 2012, 2013 lossis 2015, xaiv Cov Cuab Yeej | Extension Manager. Nyob rau sab laug vaj huam sib luag ntawm Extension Manager, xaiv Online Extensions. Nrhiav (search for) lub NUnit Test Adapter nyob rau hauv nruab nrab vaj huam sib luag thiab highlight nws. Nyem 'Download' thiab ua raws li cov lus qhia.

NUnit testing yog dab tsi?

www. nuj .org. NUnit yog qhov chaw qhib qhov chaw kuaj lub moj khaum rau lub. NET Framework thiab Mono. Nws ua haujlwm tib lub hom phiaj li JUnit ua hauv Java ntiaj teb, thiab yog ib qho ntawm ntau cov kev pab cuam hauv xUnit tsev neeg.

Pom zoo: