0.2.2 • Published 8 years ago

mica v0.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

Mica CLI

A CLI to manage and run multiple boilerplate test frameworks. These frameworks can be run strait away and share global default steps that allows one to write in a pre-defined Gherkin syntax. A snippets library for Sublime Text 3 is available here here

This CLI is in proof of concept stage

Codeship Status for maxmckenzie/mica Code Climate Test Coverage Issue Count

Install

Dependencies

  • Node v6
  • NPM
  • Git
  • Selenium-standalone
  • PhantomJS
  • npm install -g mocha babel

To install the CLI

npm install mica -g

Getting Started

once installed navigate to your the application you want to test in a terminal window. run mica install see below for additional frameworks other than webdriver.io

once that has completed you will have a new directory called /test in the root of your application. run cd test to move to that folder and then create a features directory with mkdir features

make sure to only ever change the .features directory and not any others. If you need to add custom steps there will be an empty directory located here test/support/custom where you can add and custom steps you may need. if you need to change any files other than that then you should be opening a pull request with the original boilerplate framework. The details regarding the framework can be found in the .micarc file in the root of your application.

Structuring your .feature files

Name each file after the feature that it is testing. For example

/features
  /contact.feature
  /authenticate.feature
  /homepage.feature
  /billing.feature

that way we can separate out each individual feature and keep everything nice and tidy.

An example .feature file for this would be as follows

Feature: contact
  Background: As a user
    I want to message the help desk for this company from the contact page.
    Given I open the url "/contact"

  Scenario: I fill out the contact form
    When I set "email" to the inputfield "test@example.com"
    When I click on the button "send"
    Then I expect that element "sucess-notification" becomes visible 

Be sure to have selenium running by typing selenium-standalone start in another terminal window.

Then from the root of your app run the command mica run and if everything goes as planned then it will run your tests.

Commands

mica install

This installs a boilerplate framework and creates a test directory in the directory from which the command was run. the following boilerplates are available.

  • webdriverio

only one right now, but soon I shall build a guide on how to make your own and implement here.

mica environment-check

This runs a script to check that you have core local dependencies installed.

mica help

Shows you available commands

mica update

Updates the installed boilerplate from the external repo

mica run

Runs the currently installed test framework

mica run, update and install have to be run from the root of the application your testing

Mica Commands:

   install <framework>: creates framework in directory
     example: mica install webdriverio
   environment-check: check for essential local dependencies
   update: updates the framework

   // the following are not yet implemented check the road map here
   // https://github.com/maxmckenzie/mica/wiki/RoadMap
   destroy: deletes all files relating to the framework
   run: run the tests
   watch: watch for file changes in the directory and re-test
   cleanup: remove all output and log files from your codebase

Currently Implemented:

   mica install webdriverio
   mica environment-check
   mica help
   mica run

Coding Standards

https://github.com/airbnb/javascript

Docs and Dependacies

                                                                                                              
                                                                                                              
                                   `:; ,`..,;,;;;+ +                                                          
                              :::`::`.,,...:,:,:,,.;` +                                                       
                      .;:::::.,...:,:::,,,,,,,:,,....`;:'                                                     
                     ;::::::::,.,:;:;,,,;;;:'``,,:,,,,,:,.;                                                   
                   ':::::::;;::;;:,:;,,,,,.;``,;;;:;;::...;:                                                  
                  '::::,;;.,,,,:,,,,,,,,,::;;;:;::+:::;;...:.                                                 
                 '.,::;;,,,,::.;:.,:,,,,,;;::;;;;;+';:::;'`..'                                                
                ';,..:,,,,,,'''':::;,,;.,.;:;;;;;;;''+:';;'..,:,                                              
               ':,:,,..:,.+;;+'+,':;;,,;,,;;;;;;;;;''''':;;':`:.,                                             
               ;:,;.,,:.;;;'+;'';''+'+`;::';:+;;+'+'''''''+;;:,,.                                             
              ;:::,..:.+'+'';;;;+''''''+:;'+++'''''#'''''''+;;;;:.                                            
             ':;::',:,';'''+;;;+'+++'''+''#++++#'''+++++;''':;;;';                                            
             :;:::;;'';+''''+++'''++#;'#;'++++++'+++++++++:;+;:;;'                                            
            ;;;;:::,;;+'''''+'#''#++++'+#';+++++''+++####+#;'+::::                                            
            ';;:,:,';'''''''+#+++++++++++''++++;''#'';;;::+#;'+::;                                            
            ;;;,:::'+'''''#++++++++++++++;+:#++++'''';;;;',+#;+::;                                            
            ;;;::::''''''++++++++++++++++';,'+++'''';;;,.;';+:;;:'@:                                          
           +;;,,,#''+''#++++++++++++++++#;.,,;+++'';;.,,,:':#;;'''#@                                          
           ';;;';;:++'++++++++##++++++++#:,:,;#+'';;.,,,`:,''';+;;#;                                          
           +;;;;;'##+;+++++::;;;;:++++++':;,,,,'+++',,+'',,;';;';;':                                          
           ';;;;;++++++++#;;;';;';:+++++'::,,,,,,,;:;:''';,:;;::'':''                                         
           ;';;:+++++++++::';',:,;+'++++::;,,.:;,,.,,,+''::::;:;;,:.,'.                                       
           ';;;#++++++++#:+:,::::,;+++'',:;,';;,,,,,,,,,:;::;:::,;.,,.                                        
           #;;+++++++++++';:::,'+,;;+++#::;,,,,,,,,,,,,,::;'';;,,;.:,,'                                       
           @';;#++++++++:+;:::#++';;+++':'',,,,,,,,,,,';:,,;':,:'.,:,..';                                     
          ,+;';+++++++';+';:::+'+#;'++#,';;;,,,,:,,,,,,,;:,..::,,..:,:,@#                                     
           ;;;':+++++#'''';',:#+''''+'':';;:,,,,;,,,.;:,,;:,:,,,,.::::,;:                                     
          ';;;':#++##+'++';;;';'''+++',:;;;;;,,,:,,,,;:;.:;::::,:::::,:;                                      
          ;;;;';''+'+#':;'''+'''+++#';::;;;;;;,::;,;;''::;;:;;,,::,,::::;                                     
          ';;;;'''+''':;;;:+'+++'#.:::;;,:;;;;;::;:;''';'::;:::;,:.,,,,:;                                     
          #';;;;'+'+:;;;;;;;;;;;,,:+;.,,;:;'';:;;;';';''':::':::,,''';;';                                     
           ';;';''+;;;',,';;;;,,,+'+,,;:::+';;':;''''''';;:;::;:;,,,;;;;'`                                    
          .+,;;;;':',:::,;;,:::'''':,,::::'';+':''';;:;:::@,:;;:;;,;;;;;;                                     
          #':';;,,,,:::::::,,;;#++',,,,:;''';'',';'+,,,:::##;;'::;'.;;;;;'                                    
          ,'.:':,,,,,:::::,:+'++++;::'';;;;'';';;;,,:,::;:.+:+;'::'+;;;;:;   ;                                
           ;;';:;;''++###+'''+++++::';;;;;'++;'+::,''''':;,+,+;;::'';::;;::::.:                               
          . ';;;;''''++++'''+++++@::;;;;;;;'+#'':,;;;;#;':,'++;'';'';;:;;;:'';,.                              
           +';'''''''+++'''#+++#;::;;;;;;;;'++'':';';;++''`;;+;''''';':;;;;:;;':.                             
           #;';'+''''+++'''+++#;.::;;;;;;;;''++++'''';#++;.,.+';'++''';:;;:;;';, '                            
            ;;+++''+'++++'++++;.,::;';;;;;;;'+++++''''++++;:.+;+++++'';';;;::.';'                             
            ;';+++''+++++++++'',:,:;;;;;;;;;'++++++''++++++,;++++++++;';;:;;::.';+                            
             +;'++++++++'+++;',;',;;;;;;;'''''++++++++++++'+'++'+;+++++';;:;;;,.;;                            
            ` ''++++++++++;;';:'+:';;;;;;'''''++#++++++++'###++++;;+++++;;;;;;.,,;,                           
              #;;'+++++++;';';++,;;;;;;;;'''+++'##'''+++'#####+++''++##';;;;;;;.,;,                           
               ;;'+++++#;;;';;;:+#++++++''++++#############++++#+';'''##;::';;;'.;@                           
               '''#+++#;;;';;;;,'++#+#######################++++''';;;+';,,,';;;::#                           
                +''++#:;';;;;;;;'''+#####################++++;++'';;;;##:.,,,;;;:::@                          
                ''+++:;';;;;';;''''+'#+##################+++''##;'+''##+#:',,',;:;:,#                         
                ''++';'';;;'';;+'''++###########+++###+++++''''+''+#####@';:,,,',,.:,                         
               #''+#;;';;'';;;:+''++###+#######+##+++++++++'''++#+``@#',,;#,,,,,;.,.,                         
               @''#;;;;;';''''''''+#+#+#####++###+++++++##+'+#;'##,:,@:,::#,,,,,'`.,:                         
               ''':;;;;';'''''''+++#+#++++##+++++++++#+###+';;+'+';,:;:;;:',,,,,,,:.:                         
               ++:;;;''''''''''+++++##+++####++++####+#+'''+;'+'';;',.;;,:'',,,,,,,.@                         
              ,;;;;;;',,'''''''''++'##++++########@#@##';;+:;++++;;;:,;;::++,:,,,,:.#                         
              #;;;;'':,;'''''''''+++##+++++#+#@:;;;;;;#';;;;:#;;'';;',';::;'+.`++#,.@                         
              @;;;;;':';''''#..''''++##+#####;;;;;;;;;:+;;;:#:;;;':;;,';:::+#'''''';;                         
              ';;;';:,;;+'#+;:::######@@,::#;;;;;;;;;;;+;;;#++;;;':'+#''++:+''''''';.                         
              `;;;'':';;+#+@:::;@###@.::';;;;;;;;;;;;;;+;;'+++++++''''++''+'''''''';`                         
               ;;'';;;;;;'@:;;;;:,;'::::;;;;;;;;;;;;;''+;+#++++++++++++++++'''''''';                          
               ;;';'''';.:::;:;;;;;''::;;;;;:'';;;;:#''''+++'++++++++++++++'''''''@@                          
               '''::,';,,:::;;':;;;';':';;::,#+:+++'#;'''++''++++++++++++++''''+#                             
               #;':,';':;:::;++;;;;';;::::,+++#+'++'+''++#'''+++++++++++++#'+@                                
               ,;,:,'',,::::;+++;;;''::::+''''#'++''+++++''''++++++++++++@                                    
                :::'',::::::;+++:;;;;;,+''''++##'##+#++++''''++++++++++@                                      
                :::';::;:::::''+:;;;;'''''++++'+#+###++++''''++++++++@                                        
                ';':::::::;'''+'';;:+''++++++'++++++++++'+'''++++++@                                          
                ;'':';'';''''+++#;;+'+++++##++##++++++++'++++++++#                                            
                ;',';;;''++++++##+'''#+#++++++++++++++##++'+'++++                                             
                ;''';;'''++'++++#''++#++++++++++++++++++++'+++@                                               
                :''''''++++++++#+'++++++++++++++++++++++#+++@                                                 
                +'';''''+++++++#+++++++#++++++++++++++#+#+@                                                   
                 '';'+++++++++++#+++++#+++++++++++++++++#`                                                    
                 +'''+++++++++#+++++++'+++++++++++++++#:                                                      
                  '''++++++++#+++#+++#+++++++++++##+#'                                                        
                   #''+++++++#+++#++++#+++++++++####                                                          
                     @+##+#++#++++++++##+++++##+##                                                            
                       '##+#++#+#++++++#+#+'++@'                                                              
                         ;@+##+#++++++++++++@.                                                                
                            @++#++++++++##@                                                                   
                              @#+++++++#@                                                                     
                                ;@#++@;                                                                       
                                                                                                              
                                                                                                              
                                                                                                               ```