All Projects → wookay → Jive.jl

wookay / Jive.jl

Licence: other
some useful steps in tests 👣

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to Jive.jl

beekeeper
Swarm Beekeeper is an orchestrator that can manage a cluster of Bee nodes and call into their API. It allows various scenario’s to be performed on these nodes. The Swarm team uses Beekeeper internally for integration tests.
Stars: ✭ 51 (+24.39%)
Mutual labels:  test
instant-mock
Quick and Easy web API mock server.
Stars: ✭ 27 (-34.15%)
Mutual labels:  test
eye drops
Configurable Elixir mix task to watch file changes and run the corresponding command.
Stars: ✭ 51 (+24.39%)
Mutual labels:  watch
react-native-diagnose
A framework to test a React Native app during runtime
Stars: ✭ 24 (-41.46%)
Mutual labels:  test
can-npm-publish
A command line tool that check to see if `npm publish` is possible.
Stars: ✭ 61 (+48.78%)
Mutual labels:  test
pynvme
builds your own tests.
Stars: ✭ 139 (+239.02%)
Mutual labels:  test
vscode-phpunit
The VS Code Test Explorer extension for PHPUnit
Stars: ✭ 100 (+143.9%)
Mutual labels:  test
phoenix.webui.framework
基于WebDriver的WebUI自动化测试框架
Stars: ✭ 118 (+187.8%)
Mutual labels:  test
Caraya
Assertion and unit test framework for LabVIEW
Stars: ✭ 45 (+9.76%)
Mutual labels:  test
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (+0%)
Mutual labels:  test
cover.run
Code coverage
Stars: ✭ 34 (-17.07%)
Mutual labels:  test
gowatch
watch go files for developer, support run test case and auto reload server application
Stars: ✭ 18 (-56.1%)
Mutual labels:  watch
dextool
Suite of C/C++ tooling built on LLVM/Clang
Stars: ✭ 81 (+97.56%)
Mutual labels:  test
Android-Test
Android测试中常用到的脚本
Stars: ✭ 17 (-58.54%)
Mutual labels:  test
htest
htest is a http-test package
Stars: ✭ 24 (-41.46%)
Mutual labels:  test
arduino-ci-script
Bash script for continuous integration of Arduino projects
Stars: ✭ 25 (-39.02%)
Mutual labels:  test
AnimeDLR
AnimeDLR
Stars: ✭ 47 (+14.63%)
Mutual labels:  watch
redparty
Host Youtube watch party with friends. Sync videos and chat in real-time
Stars: ✭ 70 (+70.73%)
Mutual labels:  watch
jpa-unit
JUnit extension to test javax.persistence entities
Stars: ✭ 28 (-31.71%)
Mutual labels:  test
ccheck
A command line tool for validating Kubernetes configs with rego
Stars: ✭ 63 (+53.66%)
Mutual labels:  test

Jive.jl 👣

Documentation Build Status

Jive.jl is a Julia package to help the writing tests.

runtests

run the test files in a specific directory and path.

suppose you have some test files in the test/ directory for your package. now let's make your test/runtests.jl with

using Jive
runtests(@__DIR__)

runtests.svg

for the runtests.jl, ARGS are used to filter the targets and to set the start offset of the tests.

~/.julia/dev/Jive/test $ julia runtests.jl jive/s start=3
1/4 jive/skip/skip-calls.jl --
2/4 jive/skip/skip-exprs.jl --
3/4 jive/skip/skip-functions.jl
    Pass 4  (0.40 seconds)
4/4 jive/skip/skip-modules.jl
    Pass 4  (0.01 seconds)
✅  All 8 tests have been completed.  (0.62 seconds)

in the above example, test files are matched for only have jive/s and jumping up to the 3rd file.

Examples

  • run tests
~/.julia/dev/Jive/test $ julia runtests.jl
  • run tests with target directory.
~/.julia/dev/Jive/test $ julia runtests.jl jive/If
  • distributed run tests with -p
~/.julia/dev/Jive/test $ julia -p3 runtests.jl
  • distributed run tests for Pkg.test(), using JIVE_PROCS ENV.
~/.julia/dev/Jive $ JIVE_PROCS=2 julia --project=. -e 'using Pkg; Pkg.test()'

~/.julia/dev/Jive $ julia --project=. -e 'ENV["JIVE_PROCS"]="2"; using Pkg; Pkg.test()'

TestJive.jl is an example package for using Jive. look at also the test/Project.toml file for your own package.

[deps]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Jive = "ba5e3d4b-8524-549f-bc71-e76ad9e9deed"

[targets]
test = ["Test", "Jive"]

Watch package folders

You may need to install Revise.jl.

~/.julia/dev/Jive/test/Example/test $ cat runtests.jl
using Jive
runtests(@__DIR__, skip=["revise.jl"])

~/.julia/dev/Jive/test/Example/test $ cat revise.jl
# julia -i -q --project=. revise.jl example

using Revise, Jive
using Example

trigger = function (path)
    printstyled("changed ", color=:cyan)
    println(path)
    revise()
    runtests(@__DIR__, skip=["revise.jl"])
end

watch(trigger, @__DIR__, sources=[pathof(Example)])
trigger("")

Base.JLOptions().isinteractive==0 && wait()

~/.julia/dev/Jive/test/Example/test $ julia -e 'using Pkg; pkg"dev Revise .."'

~/.julia/dev/Jive/test/Example/test $ julia -i -q --project=. revise.jl example
watching folders ...
  - ../src
  - example
changed
1/1 example/test1.jl
    Pass 1  (0.27 seconds)
✅  All 1 test has been completed.  (0.55 seconds)

when saving any files in the watching folders, it automatically run tests.

@skip

skip the expression.

using Jive # @skip

@skip module want_to_skip_this_module
sleep(2)
end

@skip function want_to_skip_this_function()
sleep(2)
end

@skip println(1+2)
  • Change to do not skip the code: set ENV["JIVE_SKIP"] = "0"

@onlyonce

used to run the block only once.

using Jive # @onlyonce

for _ in 1:10
    @onlyonce begin
        println(42)
    end
    @onlyonce(println("hello"))
end

@If

evaluate the module by the condition.

using Jive # @If
@If VERSION >= v"1.1.0-DEV.764" module load_some_module
end

@useinside

use inside of the module.

using Jive # @useinside
@useinside module test_pkgs_flux_optimise
# ...
end

@__END__

throw(Jive.EndError())

using Jive
@__END__

@__REPL__

~/.julia/dev/Jive/test/jive/__REPL__ $ cat test.jl
using Jive

a = 1

@__REPL__

@info :a a
~/.julia/dev/Jive/test/jive/__REPL__ $ julia test.jl
julia> a += 2
3

julia> ^D  # Ctrl + D to exit the REPL
┌ Info: a
└   a = 3
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].