Coder Social home page Coder Social logo

yippeeapp / xltestlog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xareelee/xltestlog

0.0 2.0 0.0 1.59 MB

Styling and coloring your XCTest logs on Xcode Console

License: MIT License

Ruby 0.52% Objective-C 40.69% C 28.07% Shell 2.41% C++ 28.31%

xltestlog's Introduction

XLTestLog

XLTestLog is a lightweight library for stylish XCTest logs. It makes your testing logs more readable in Xcode Console.

  • Reformat the log messages to make them more readable.
  • Use indentations and Emoji bullets to distinguish between different logs.
  • Paint log messages and highlight important keywords using XcodeColors.

The original test code is simple (one passed test, one failed test, one measure task, and one message fromNSLog()) but has poor readability in Xcode Console without XLTestLog:

@implementation XLTestLogDevTests

- (void)testPassedCase {
  XCTAssert(YES, @"Pass");
  NSLog(@"This is a message from `NSLog()`.");
}

- (void)testFailureCase {
  XCTAssert(NO, @"Fail");
}

- (void)testPerformanceExample {
  // This is an example of a performance test case.
  [self measureBlock:^{
    int j = 0;
    for (int i = 0; i < 1000000; i++) {
      j += i;
    }
  }];
}
@end

Release Notes

You should also install XcodeColors

Currently, you should use XLTestLog with XcodeColors. If you don't, it would show the color code in the logs.

In the next release, XLTestLog will read the environment variable XcodeColors to decide whether using XcodeColors to paint log messages or not.

Installation

Before installing XLTestLog, please read the section Release Notes.

via CocoaPods

You can install XLTestLog simply via CocoaPods:

target :MyAppTests do
  pod 'XLTestLog'
end

Manually

You can install XLTestLog manually via adding files in XLTestLog/ directory into your project. You also need to install XAspect library to use XLTestLog.

About

Contribution

Any help would be most welcome. Even buy me a beer. :p

Author

License

XLTestLog is available under the MIT license. See the LICENSE file for more info.

xltestlog's People

Contributors

xareelee avatar

Watchers

Chew Chit Siang avatar  avatar

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.