Kuidas alla laadida ja installida CUCUMBER Windows

Cucumber paigaldamine vรตib olla tรผรผtu, kuid suhteliselt lihtne.

Siin on teekaart komponentidest, mis tuleb valmistamiseks installida Cucumber tรถรถ

Installige Ruby ja DevKit

Samm 1) Peab https://rubyinstaller.org/downloads/

Installige Ruby ja DevKit

Step 2) Avage allalaaditud fail.

  1. Luba nรตus
  2. Klรตpsake nuppu Edasi

Installige Ruby ja DevKit

Step 3) Jรคrgmisel ekraanil.

  1. Valige oma installikataloog
  2. Valige kรตik suvandid
  3. Klรตpsake nuppu Installi

Installige Ruby ja DevKit

Step 4) Jรคrgmisel ekraanil klรตpsake nuppu Edasi

Installige Ruby ja DevKit

Step 5) Oodake, kuni installimine lรตpetatakse.

Installige Ruby ja DevKit

Step 6) Klรตpsake nuppu Lรตpeta

Installige Ruby ja DevKit

Step 7) Kui installimine on lรตpetatud, kรคivitage Ruby!

Installige Ruby ja DevKit

Step 8) Sa nรคed Ruby kรคsuviip sarnaseid Windows cmd.

Installige Ruby ja DevKit

paigaldama Cucumber

Step 1) Tippige Ruby cmd "gem install cucumber". See kรคsk laaditakse alla ja installitakse Cucumber kรคsureal ise

paigaldama Cucumber

Mรตne sekundi pรคrast on alanud kurgi paigaldamine

paigaldama Cucumber

Step 2) Kontrollimaks, kas kurk on edukalt installitud vรตi mitte, tippige lihtsalt "cucumber โ€“version"

paigaldama Cucumber

Installige IDE RubyMine

IDE RubyMine'i edukaks installimiseks peaksite jรคrgima alltoodud samme.

Installige IDE RubyMine

Step 1) IDE RubyMine'i installimise jรคtkamiseks klรตpsake nuppu Edasi.

Installige IDE RubyMine

Step 2) Valige Installi asukoht

Installige IDE RubyMine

Step 3) Paigaldusvalikud

Installige IDE RubyMine

Step 4) Valige kaust Start

Installige IDE RubyMine

Step 5) Klรตpsake nuppu Installi

Installige IDE RubyMine

Step 6) Klรตpsake nuppu Lรตpeta

Installige IDE RubyMine

Step 7) Valige ร„ra impordi sรคtteid.

Installige IDE RubyMine

Step 8) Klรตpsake nuppu Hinda

Installige IDE RubyMine

Step 9) Nรตustuge litsentsiga

Installige IDE RubyMine

Step 10) Jรคta vahele ja mรครคra vaikeseaded

Installige IDE RubyMine

Step 11) avatud

Installige IDE RubyMine

Step 12) Looge uus projekt

Installige IDE RubyMine

Installige watir-veebidraiver

Step 1) Klรตpsake nuppu "Start Command Prompt With ruby" ja installige kรคsk "gem install watir-webdriver"

Installige watir-veebidraiver

Step 2) watir-webdriver installimine รตnnestus

Installige watir-veebidraiver

esimene Cucumber Script

Step 1) Avage RubyMine'i redaktor akna Start menรผรผ kaudu

Cucumber Script

Nรคete Rubymine'i armatuurlauda nagu allpool

Cucumber Script

Step 2) Looge Rubymine'i redaktoris uus projekt

Cucumber Script

Cucumber Script

Step 3) luua failikataloog

Cucumber Script

Cucumber Script

Step 4) looge ja salvestage fail kaustas "teie kaust/funktsioonid/" nimega "teie failinimi.funktsioon"

Cucumber Script

Cucumber Script

Step 5) Meie stsenaariumi tรคitmiseks salvestage funktsioonifaili jรคrgmised kรคsud

Cucumber Script

Code:

Feature: Multiplication 
I multiply two numbers 
	Scenario: multiply a and b 
		Given I have variable a 
		And I have variable b 
		When I multiplication a and b 
		Then I display the Result

Step 6) Nรผรผd kรคivitame meie esimese funktsioonifaili.

Klรตpsake nuppu "Kรคivita kรคsuviip rubiiniga"

Cucumber Script

See nรคeb vรคlja selline!

Cucumber Script

Step 7) Vรตimaldab luua meie funktsioonifaili jaoks sammu mรครคratluse faili!

Looge Rubymine'i redaktoris uus kaust

Cucumber Script

Cucumber Script

Step 8) Salvestage fail nagu allpool jaotises "yourfolder/features/step_definititons" nimega test_step.rb

Cucumber Script

Cucumber Script

Step 9) Kirjutage sammufaili jรคrgmine kood

Cucumber Script

Code :

Given(/^I have variable a$/) do
@a = 50
end

And(/^I have variable b$/) do
@b = 70
end

When(/^I multiplication a and b$/) do 
@mul = @a * @b
end

Then(/^I display the Result$/) do 
puts "Multiplication of #{@a} and #{@b} is #{@mul}"
end

Step 10) Nรผรผd kรคivitage uuesti meie funktsioonifail:

Cucumber Script

Tulemuseks on

Cucumber Script

Vรตta see postitus kokku jรคrgmiselt: