diff --git a/tests/cppaql/approximateMatching.cpp b/tests/cppaql/approximateMatching.cpp
index 1da8695466200a921e9f78057870bc7248532e7a..6832e69ed0c0dcb3887bc526e4cff92b6385094b 100644
--- a/tests/cppaql/approximateMatching.cpp
+++ b/tests/cppaql/approximateMatching.cpp
@@ -17,7 +17,7 @@ static std::string qSetError(const size_t error, const std::string& var)
 
 static std::string qPrepareString(const std::string& file, const std::string& var)
 {
-    return ext::concat("execute < ", file, " > $", var);
+    return ext::concat("execute < \"", file, "\" > $", var);
 }
 
 static std::string qExtendAlphabet(const std::string& s1, const std::string& s2)
diff --git a/tests/cppaql/arbologyTest.cpp b/tests/cppaql/arbologyTest.cpp
index 1a498b311c2ea16763ea4ed7f55082cf29574f9b..50babb06c28fef8e95c75de61c9c6c4b69897b31 100644
--- a/tests/cppaql/arbologyTest.cpp
+++ b/tests/cppaql/arbologyTest.cpp
@@ -129,8 +129,8 @@ static std::vector<std::pair<std::string, std::string>> pair_pattern_subject(con
 void runTest(const std::string& exactPipeline, const std::string& pipeline, const std::string& pFile, const std::string& sFile)
 {
     ext::vector<std::string> qs = {
-        ext::concat("execute < ", pFile, " > $pattern"),
-        ext::concat("execute < ", sFile, " > $subject"),
+        ext::concat("execute < \"", pFile, "\" > $pattern"),
+        ext::concat("execute < \"", sFile, "\" > $subject"),
         ext::concat("execute ", exactPipeline, " > $res1"),
         ext::concat("execute ", pipeline, " > $res2"),
         "quit compare::IsSame <(stats::SizeStat $res1) <(stats::SizeStat $res2)",
diff --git a/tests/cppaql/conversionsTest.cpp b/tests/cppaql/conversionsTest.cpp
index ea8c6f8c49c27a272c76dcd1e0cb4d5c0fa9bafd..2ce333c6bdfff3390a6fba97b66f93180e046d87 100644
--- a/tests/cppaql/conversionsTest.cpp
+++ b/tests/cppaql/conversionsTest.cpp
@@ -22,7 +22,7 @@ void fileTest(const std::string& pipeline)
 {
     for (const std::string& inputFile : TestFiles::Get("/automaton/aconversion.test.*.xml$")) {
         ext::vector<std::string> qs = {
-            ext::concat("execute < ", inputFile, " > $gen"),
+            ext::concat("execute < \"", inputFile, "\" > $gen"),
             ext::concat("quit compare::AutomatonCompare <( $gen | ", qMinimize, " ) <( $gen | ", pipeline, " | ", qMinimize, ")")};
         TimeoutAqlTest(10s, qs);
     }
diff --git a/tests/cppaql/conversionsTest2.cpp b/tests/cppaql/conversionsTest2.cpp
index 1427c64554a74601f2a2bd2be1f2a47c60ae74e8..40af53f35bc1243f8b9e256cba6e038c18f6beea 100644
--- a/tests/cppaql/conversionsTest2.cpp
+++ b/tests/cppaql/conversionsTest2.cpp
@@ -29,7 +29,7 @@ TEST_CASE("FTA-RTE conversions test", "[integration]")
     {
         for (const std::string& inputFile : TestFiles::Get("/rte/rte*.xml$")) {
             ext::vector<std::string> qs = {
-                ext::concat("execute < ", inputFile, " | rte::convert::ToFTAGlushkov - > $gen"),
+                ext::concat("execute < \"", inputFile, "\" | rte::convert::ToFTAGlushkov - > $gen"),
                 ext::concat("quit compare::AutomatonCompare <( $gen | ", qMinimize, " ) <( $gen | automaton::convert::ToRTEStateElimination - | rte::convert::ToFTAGlushkov - | ", qMinimize, ")")};
 
             TimeoutAqlTest(10s, qs);
@@ -57,7 +57,7 @@ TEST_CASE("FTA-RTE conversions test", "[integration]")
 
         for (const std::string& file : files) {
             ext::vector<std::string> qs = {
-                ext::concat("execute < ", file, " > $fta1"),
+                ext::concat("execute < \"", file, "\" > $fta1"),
                 "execute $fta1 | automaton::convert::ToRTEStateElimination - | rte::convert::ToFTAGlushkov - > $fta2",
                 ext::concat("execute $fta1 | ", qMinimize, " > $m1"),
                 ext::concat("execute $fta2 | ", qMinimize, " > $m2"),
diff --git a/tests/cppaql/determinizeTest.cpp b/tests/cppaql/determinizeTest.cpp
index 68651110e8125db60cd7e01644500a45f63e1a51..4b2d55a04b164e294d2d19cffc266ed55de73b16 100644
--- a/tests/cppaql/determinizeTest.cpp
+++ b/tests/cppaql/determinizeTest.cpp
@@ -22,8 +22,8 @@ TEST_CASE("Determinization", "[integration]")
                                std::make_tuple("automaton::determinize::Determinize - | automaton::simplify::Normalize -", TestFiles::GetOne("/automaton/NPDA1.xml$"), TestFiles::GetOne("/automaton/NPDA1.DET.xml$")));
 
     ext::vector<std::string> qs = {
-        ext::concat("execute < ", std::get<1>(definition), " > $input"),
-        ext::concat("execute < ", std::get<2>(definition), " > $expected"),
+        ext::concat("execute < \"", std::get<1>(definition), "\" > $input"),
+        ext::concat("execute < \"", std::get<2>(definition), "\" > $expected"),
         ext::concat("quit compare::AutomatonCompare <( $input | ", std::get<0>(definition), " ) $expected")};
 
     TimeoutAqlTest(2s, qs);
diff --git a/tests/cppaql/exactMatching.cpp b/tests/cppaql/exactMatching.cpp
index 9d6c33eff4fc6a1e8d805a6b8454878b28aa5d9c..dde7012c413d8f979d74e04ba7c94b848dfcf0e0 100644
--- a/tests/cppaql/exactMatching.cpp
+++ b/tests/cppaql/exactMatching.cpp
@@ -55,8 +55,8 @@ TEST_CASE("ExactMatching", "[integration]")
             subjectFile.replace(pos, s.size(), s);
 
             ext::vector<std::string> qs = {
-                ext::concat("execute < ", patternFile, " > $pattern"),
-                ext::concat("execute < ", subjectFile, " > $subject"),
+                ext::concat("execute < \"", patternFile, "\" > $pattern"),
+                ext::concat("execute < \"", subjectFile, "\" > $subject"),
                 "execute stringology::exact::ExactFactorMatch $subject $pattern > $res1"};
 
             if (std::get<2>(definition))
diff --git a/tests/cppaql/glushkovRteTest.cpp b/tests/cppaql/glushkovRteTest.cpp
index a37ece70155079f83d185fc4d4f0e99a26d2c857..3531fb3c4d2a0b9c918ce2c123a473035a2b13ea 100644
--- a/tests/cppaql/glushkovRteTest.cpp
+++ b/tests/cppaql/glushkovRteTest.cpp
@@ -39,7 +39,7 @@ TEST_CASE("GlushkovRTE", "[integration]")
             try {
                 for (size_t i = 0; i < TESTCASES; i++) {
                     ext::vector<std::string> qs = {
-                        ext::concat("execute < ", file, " | rte::convert::ToPostfixPushdownAutomatonGlushkov - | automaton::determinize::Determinize - > $pda"),
+                        ext::concat("execute < \"", file, "\" | rte::convert::ToPostfixPushdownAutomatonGlushkov - | automaton::determinize::Determinize - > $pda"),
                         ext::concat("execute \"", m_Generators.at(base)->generate(), "\" | Move - | string::Parse @tree::Tree - | "
                                                                                      "string::transform::StringConcatenate ( PostfixRankedTree ) - <(string::Parse @string::String \"\\\"#$\\\"\") > $string"),
                         "quit automaton::run::Accept $pda $string",
@@ -63,7 +63,7 @@ TEST_CASE("GlushkovRTE", "[integration]")
             try {
                 for (size_t i = 0; i < TESTCASES; i++) {
                     ext::vector<std::string> qs = {
-                        ext::concat("execute < ", file, " | rte::convert::ToFTAGlushkov - | automaton::determinize::Determinize - > $fta"),
+                        ext::concat("execute < \"", file, "\" | rte::convert::ToFTAGlushkov - | automaton::determinize::Determinize - > $fta"),
                         ext::concat("execute \"", m_Generators.at(base)->generate(), "\" | Move - | string::Parse @tree::Tree - > $input"),
                         "quit automaton::run::Accept $fta (PostfixRankedTree)$input",
                     };
@@ -86,7 +86,7 @@ TEST_CASE("GlushkovRTE", "[integration]")
             try {
                 for (size_t i = 0; i < TESTCASES; i++) {
                     ext::vector<std::string> qs = {
-                        ext::concat("execute < ", file, " | rte::convert::ToFTAThompson - | automaton::simplify::EpsilonRemoverOutgoing - | automaton::determinize::Determinize - > $fta"),
+                        ext::concat("execute < \"", file, "\" | rte::convert::ToFTAThompson - | automaton::simplify::EpsilonRemoverOutgoing - | automaton::determinize::Determinize - > $fta"),
                         ext::concat("execute \"", m_Generators.at(base)->generate(), "\" | Move - | string::Parse @tree::Tree - > $input"),
                         "quit automaton::run::Accept $fta (PostfixRankedTree)$input",
                     };
diff --git a/tests/cppaql/minimizeTest.cpp b/tests/cppaql/minimizeTest.cpp
index 7fa3450bf88fdd53740fc0225f2e6df3b673e943..8876e656e91dcc6f960986b71deee46e83422d19 100644
--- a/tests/cppaql/minimizeTest.cpp
+++ b/tests/cppaql/minimizeTest.cpp
@@ -30,17 +30,17 @@ TEST_CASE("Minimization FA test", "[integration]")
             ext::vector<std::string> qs;
 
             qs = {
-                ext::concat("execute < ", inputFile, " > $gen"),
+                ext::concat("execute < \"", inputFile, "\" > $gen"),
                 ext::concat("quit compare::AutomatonCompare <( $gen | ", qMinimizeHop, " ) <( $gen | ", qMinimizeBrz, ")")};
             TimeoutAqlTest(2s, qs);
 
             qs = {
-                ext::concat("execute < ", inputFile, " > $gen"),
+                ext::concat("execute < \"", inputFile, "\" > $gen"),
                 ext::concat("quit compare::AutomatonCompare <( $gen | ", qMinimizeHop, " ) <( $gen | ", qMinimizeDis, ")")};
             TimeoutAqlTest(2s, qs);
 
             qs = {
-                ext::concat("execute < ", inputFile, " > $gen"),
+                ext::concat("execute < \"", inputFile, "\" > $gen"),
                 ext::concat("quit compare::AutomatonCompare <( $gen | ", qMinimizeHop, " ) <( $gen | ", qMinimizeUnd, ")")};
             TimeoutAqlTest(2s, qs);
         }
diff --git a/tests/cppaql/normalizeTest.cpp b/tests/cppaql/normalizeTest.cpp
index d2afe698fa4d710ecdca84a939d2e0c493fb057e..eaefc4eef64c270fcd805db9974eca44bfb9ec8b 100644
--- a/tests/cppaql/normalizeTest.cpp
+++ b/tests/cppaql/normalizeTest.cpp
@@ -25,7 +25,7 @@ TEST_CASE("Normalize test", "[integration]")
     {
         for (const std::string& file : TestFiles::Get("/grammar/anormalization.test.*.xml$")) {
             ext::vector<std::string> qs = {
-                ext::concat("execute < ", file, " > $cfg"),
+                ext::concat("execute < \"", file, "\" > $cfg"),
                 ext::concat("execute ", algorithm, " $cfg > $cfg2"),
                 ext::concat("execute grammar::generate::GenerateUpToLength $cfg ", STRING_LENGTHS, " > $str"),
                 ext::concat("execute grammar::generate::GenerateUpToLength $cfg2 ", STRING_LENGTHS, " > $str2"),
diff --git a/tests/cppaql/readerTest.cpp b/tests/cppaql/readerTest.cpp
index 7262e3f8f5f33a03c5489d2442c04eeab5716731..e3b855d05fcb087778e4c487c44bbe0b38995ab1 100644
--- a/tests/cppaql/readerTest.cpp
+++ b/tests/cppaql/readerTest.cpp
@@ -11,10 +11,11 @@ TEST_CASE("ReaderTest | Xml", "[integration]")
 
     for (const std::string& file : TestFiles::Get(regexp)) {
         ext::vector<std::string> qs = {
-            ext::concat("execute < ", file, " > $object"),
-            "execute $object > /dev/null",
+            ext::concat("execute < \"", file, "\" > $object"),
+            "execute $object > \"/dev/null\"",
         };
 
+
         TimeoutAqlTest(1s, qs);
     }
 }
@@ -30,7 +31,7 @@ TEST_CASE("ReaderTest | Txt ", "[integration]")
     for (const std::string& file : TestFiles::Get(def.second)) {
         ext::vector<std::string> qs = {
             ext::concat("execute cli::builtin::ReadFile \"", file, "\" | Move - | string::Parse @", def.first, " -  > $object"),
-            "execute $object > /dev/null",
+            "execute $object > \"/dev/null\"",
         };
 
         TimeoutAqlTest(1s, qs);
diff --git a/tests/cppaql/regexpDerivationIntegralTest.cpp b/tests/cppaql/regexpDerivationIntegralTest.cpp
index 1837f733452d650948b9e0b8c1aaf1c790d4ef1f..359d7efad0abb9f49c6344435a53fc889c37687c 100644
--- a/tests/cppaql/regexpDerivationIntegralTest.cpp
+++ b/tests/cppaql/regexpDerivationIntegralTest.cpp
@@ -26,8 +26,8 @@ TEST_CASE("RegExp Derivation/Integral test", "[integration]")
                                std::make_tuple(Op::INTEGRAL, TestFiles::GetOne("/regexp/Melichar2-94.xml"), TestFiles::GetOne("/regexp/Melichar2-94.i1.xml"), "1"));
 
     std::vector<std::string> qs = {
-        ext::concat("execute < ", std::get<1>(definition), " > $regexp"),
-        ext::concat("execute < ", std::get<2>(definition), " > $result"),
+        ext::concat("execute < \"", std::get<1>(definition), "\" > $regexp"),
+        ext::concat("execute < \"", std::get<2>(definition), "\" > $result"),
         ext::concat("execute \"\\\"", std::get<3>(definition), "\\\"\" | Move - | string::Parse @string::String - > $string"),
         ext::concat("quit compare::AutomatonCompare <( $result | ", mdfa, " ) <( regexp::transform::RegExp", std::get<0>(definition) == Op::DERIVATION ? "Derivation" : "Integral", " $regexp $string | ", mdfa, " )")};
 
diff --git a/tests/cppaql/regexpOptimizeTest.cpp b/tests/cppaql/regexpOptimizeTest.cpp
index 8f121d23d0b125fc20514359a8c37cfd81f6f753..a371c7389dc6e984d65d920601088a2f0fe5c1f8 100644
--- a/tests/cppaql/regexpOptimizeTest.cpp
+++ b/tests/cppaql/regexpOptimizeTest.cpp
@@ -28,7 +28,7 @@ TEST_CASE("RE optimize test", "[integration]")
         for (size_t i = 0; i < ITERATIONS; i++) {
             ext::vector<std::string> qs = {
                 ext::concat(qGenRE(), " > $gen"),
-                "execute string::Compose $gen > /tmp/file",
+                "execute string::Compose $gen > \"/tmp/file\"",
                 ext::concat("quit compare::AutomatonCompare <( $gen | regexp::convert::ToAutomaton - | ", qMinimize1, " ) <( $gen | regexp::simplify::RegExpOptimize - | regexp::convert::ToAutomaton - | ", qMinimize2, ")")};
             TimeoutAqlTest(10s, qs);
         }
diff --git a/tests/cppaql/treeNotationTest.cpp b/tests/cppaql/treeNotationTest.cpp
index 5c052b8e2c7b5e608283729b62e0d5b7d36a79ce..cc7b681e2ae03e91873cc82b55d0bca55ab27ae0 100644
--- a/tests/cppaql/treeNotationTest.cpp
+++ b/tests/cppaql/treeNotationTest.cpp
@@ -19,7 +19,7 @@ TEST_CASE("TreeNotation tests | Files", "[integration]")
     {
         for (const std::string& file : TestFiles::Get("/tree/repeats.*.xml")) {
             ext::vector<std::string> qs = {
-                ext::concat("execute < ", file, " > $res1"),
+                ext::concat("execute < \"", file, "\" > $res1"),
                 ext::concat("execute (RankedTree)", casts, "$res1 > $res2"),
                 "quit compare::IsSame $res1 $res2",
             };
diff --git a/tests/cppaql/treeRepeatsTest.cpp b/tests/cppaql/treeRepeatsTest.cpp
index 29f410732a02c3f172640ea8df4af45eb04e4a61..f3c906e48f5a283a4a502fa69c5ee706d22377c2 100644
--- a/tests/cppaql/treeRepeatsTest.cpp
+++ b/tests/cppaql/treeRepeatsTest.cpp
@@ -22,7 +22,7 @@ TEST_CASE("TreeRepeats", "[integration]")
     {
         for (const std::string& file : TestFiles::Get("/tree/repeats.*.xml")) {
             ext::vector<std::string> qs = {
-                ext::concat("execute < ", file, " > $tree"),
+                ext::concat("execute < \"", file, "\" > $tree"),
                 "execute tree::properties::ExactSubtreeRepeatsNaive $tree | tree::simplify::NormalizeTreeLabels - > $res1", // naive
                 ext::concat("execute ", pipeline, " > $res2"),
                 "quit compare::IsSame $res1 $res2",
diff --git a/tests/testing/AqlTest.hpp b/tests/testing/AqlTest.hpp
index 8833635752a177a553bd95dc66ce4ec5ce5dbaa3..8ee8cdda228fe3991fc22d78afd12001348abc05 100644
--- a/tests/testing/AqlTest.hpp
+++ b/tests/testing/AqlTest.hpp
@@ -32,10 +32,9 @@ AqlTestResult AqlTest(Stream& is, unsigned seed)
         common::Streams::err = ext::reference_wrapper<ext::ostream>(oss);
 
         // seed cli, run test file
-        auto testSeed = std::make_shared<cli::StringLineInterface>("set seed " + ext::to_string(seed));
-        auto testFile = std::make_shared<cli::IstreamLineInterface<Stream&>>(is);
+        auto testSeed = "set seed " + ext::to_string(seed);
         result = environment.execute(testSeed);
-        result = environment.execute(testFile);
+        result = environment.execute(is);
 
         int returnValue;
         if (result == cli::CommandResult::QUIT || result == cli::CommandResult::RETURN) {