VirtualTam's bookmarks
155 bookmarks found
-
The Process | CommitStrip
2016-01-08 -
-
bslatkin/dpxdt · GitHub
2015-09-17 Make continuous deployment safe by comparing before and after webpage screenshots for each release.
-
Pro: no need to setup a DNS server to test virtualhosts Con: keep in mind that all "fake" hosts will point to 127.0.0.1!
- Use /etc/hosts to declare test hosts / domains / subdomains
#<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 localhost.localdomain localhost 127.0.0.1 host.localdomain host 127.0.0.1 sub.host.localdomain sub.host ::1 localhost.localdomain localhost
- Allow per-user virtualhost definition in either (depending on your distro)
/etc/httpd/conf/httpd.conf
/etc/apache2/apache2.conf
Include
/home/albert/.httpd/*.conf
- Profit! Create virtualhosts with local hostnames :)
-
Writing testable code
2015-05-12 -
Obey the testing goat...
2015-05-10 - Test first! Test first!
-
TaskBuster Django tutorial
2015-05-10 -
PHP - Testing your privates
2015-03-17 How to test a private or protected method with PHPUnit?
see also: https://sebastian-bergmann.de/archives/881-Testing-Your-Privates.html
-
Python unit testing frameworks: Nose, Pytest
2015-02-13 Python's built-in unittest module is quite cool, but a bit limited and way too verbose (read: it's quite not easy to incite developers to write unit tests)
I'm currently looking for more dev-friendly solutions, the key points being:
- writing test code should be easy and straight-forward -keep the focus on "what to test" instead of "how to transcribe a process to a test"
- parallelization! -we, spoiled developers, should make good use of our way-too-many-cores build machines...
- complete feature set!
- we don't want to just run tests...
- coverage reports (find dead/weak/untested code sections)
- output formatting (JUnit-XML seems to be quite a common format out there)
There seem to be 3 solutions in Python:
- stock unittest + project-dependent customizations / test helpers
- nosetests
- py.test
And 2 ways of gettings things done:
- keeping things stock: no external dependency, project-specific implementation...
- using a test framework: one more module in your (test) virtualenv, more concise tests, more features (// run, code coverage, etc.)
Some links:
-
Python: run specific unit tests
2015-02-13 Given your unittests are in the
tests
directory:1# run a specific test module 2python -m unittest tests.<module> 3 4# run a specific test suite 5python -m unittest tests.<module>.<class> 6 7# run a specific test 8python -m unittest tests.<module>.<class>.<test> 9 10# run tests matching a given pattern 11python -m unittest discover -s tests -p <pattern>
-
nose: python testing helper
2015-01-04 Includes support for Coverage, Xunit and other cool stuff ;-) Oh, and there is parallel testing, too \o/
nosetests --with-coverage --cover-erase --cover-tests --cover-html --cover-html-dir=htmlcov --with-xunit --xunit-file=unit.xml
via http://www.alexconrad.org/2011/10/jenkins-and-python.html
-
Continuous integration in Python
2014-11-27 http://ilovesymposia.com/2014/10/01/continuous-integration-0-automated-tests-with-pytest/ http://ilovesymposia.com/2014/10/02/continuous-integration-1-test-coverage/ http://ilovesymposia.com/2014/10/13/continuous-integration-in-python-3-set-up-your-test-configuration-files/ http://ilovesymposia.com/2014/10/15/continuous-integration-in-python-4-set-up-travis-ci/ http://ilovesymposia.com/2014/10/15/continuous-integration-in-python-5-report-test-coverage-using-coveralls/ http://ilovesymposia.com/2014/10/17/continuous-integration-in-python-6-show-off-your-work/ http://ilovesymposia.com/2014/10/27/continuous-integration-in-python-7-some-helper-tools-and-final-thoughts/
-
Uses a project or repository's history to plot user contributions, displaying an elegant, colored graph of the file arborescence.
After running it on quite different projects...
- Python/Bash CI/Jenkins scripts
- Qt apps: GoldenDict, Psi+
- PHP website: Shaarli
...watching some vids on teh intartubez:
- Minecraft: https://www.youtube.com/watch?v=zRjTyRly5WA
- Linux kernel: https://www.youtube.com/watch?v=AhDiYPLo3p4
- Python: https://www.youtube.com/watch?v=cNBtDstOTmA
It allows to arbitrary spot some interesting implementation aspects (sorted by descending impact):
- language-dependent trees (oh hai Java packages ^^)
- framework-dependent trees
- project-management method (none, Agile, TDD)
Having a graphical tool also quickly shows:
- the overall structure of the project (a bit cooler than a simple $ tree, way quicker than loading the project on an IDE)
- the repartition of files (by extensions)
- who are the most active contributors
- what are the most modified files over time
- who does what: additions, deletions, refactoring
Some more CI-related matters:
- are there any tests?
- what is the source code / test code ratio? (we could expect a project/lib with N modules to have at least N test modules)
- who initiates / implements / optimizes test code?