GithubHelp home page GithubHelp logo

hustzyd / objc-test-stub-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samuelzhaoy/objc-test-stub-generator

0.0 2.0 0.0 464 KB

Obj-C Test-Stub generator for automatically generating XCTestCase classes for Objective-C class declarations

PHP 100.00%

objc-test-stub-generator's Introduction

objc-test-stub-generator

Obj-C Test-Stub generator for automatically generating XCTestCase classes for Objective-C class declarations

This tool scans a given directory for *.h files and automatically generates XCTestCase classes from the class declarations found inside each file.

It simply looks into each file for the first Objective-C class declaration, takes the class name to name the generated XCTestCase class after it and scans for declared public instance-methods to generate one test-method for each one declared.

Generated XCTestCases are written out into files with equal name.

You simply need to configure the pathToProject, projectName, basePathForTests settings. The rest can be left as-is, as starting point.

configuration

Setup where to scan for files and the name of the project

$pathToProject  = realpath('.');
$projectName    = 'testProject';

base path for creating the files with the generated test cases

$basePathForTests	= './Tests/';

integrate imports for OCMock and OCMockObject usage?

$useOCMock 		= false;
$useOCMockObject	= false;

Blacklisting, to avoid generating unnecessary test classes:

if you want to avoid generating test cases for classes without methods.

$ignoreClassesWithoutMethods = true;

list of lower case class names we will generate no test class for.

$useClassBlacklist   = false;
$ignoreClassesByName = array(
	    'appdelegate',
);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.