Giter Club home page Giter Club logo

mvc-platform-test's Introduction

This repository provides a basic Ufront project that can be used to test that ufront's HttpRequest and HttpResponse objects behave reliably across different platforms. Once these are known to be working for a platform, all other tests can be set up to use mock request and response objects for easier testing.

Current Status

Supported Platforms:

  • Neko (mod_neko) ^1
  • Neko (mod_tora) ^1
  • Nekotools ^2 ^3
  • PHP (apache) ^1

Known Issues:

  1. request.parseMultipart is currently not supported. Support will be added soon.
  2. Nekotools sever does not support multipart handling, and we currently do not provide a fallback.
  3. Nekotools server does not allow changing the "ContentType" header, charset encoding, or "Content-Length" headers for requests.

Possible Future Platforms:

  • NodeJS
  • Browser JS (emulate Http requests using Browser's pushstate functionality)

Example usage

Set up the sites and run them

haxe requestresponsetester.hxml
cd out/neko_nocache/
nekotools server -rewrite

Run the tests:

haxe requestresponsetester.hxml
neko out/requestresponsetester.n http://localhost:2000/ out/neko_nocache/

Example apache config

<VirtualHost uftest.dev:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /home/user/workspace/ufront/platformtest/out/

	<Directory /home/user/workspace/ufront/platformtest/out/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	LogLevel warn
	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Combined with the .htaccess files in the out/ directories, this will enable you to test each of the apache-based platforms.

See runscripts for example usage with this setup.

mvc-platform-test's People

Contributors

jasononeil avatar

Watchers

James Cloos avatar Kevin Leung 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.