![]() |
ওপেনওয়েভ সিমুলেটেড হ্যাপি টপোলজির উপর ওয়েভ কার্যকারিতা পরীক্ষা করার জন্য অনেকগুলি পাইথন স্ক্রিপ্ট অন্তর্ভুক্ত করে। এই পরীক্ষাগুলি নিশ্চিত করে যে টপোলজি সঠিকভাবে নেটওয়ার্ক সংযোগ এবং ওয়েভ স্থাপনার জন্য কনফিগার করা হয়েছে।
টেস্ট কেস স্ক্রিপ্ট /src/test-apps/happy/tests
এ OpenWeave সংগ্রহস্থলে পাওয়া যায়। দুই ধরনের পরীক্ষা আছে:
চালান
- OpenWeave ইনস্টল করুন। নির্দেশাবলীর জন্য OpenWeave বিল্ড গাইড দেখুন।
- হ্যাপি ইনস্টল করুন। নির্দেশাবলীর জন্য শুভ সেটআপ নির্দেশিকা দেখুন।
- টার্গেট টেস্ট কেস ধারণকারী ডিরেক্টরিতে নেভিগেট করুন। উদাহরণস্বরূপ, একটি ইকো প্রোফাইল পরীক্ষার ক্ষেত্রে চালানোর জন্য:
cd <path-to-openweave-core>/src/test-apps/happy/tests/standalone/echo
python test_weave_echo_01.py
Change test topology
OpenWeave test cases run against the sample Happy topologies found in
/src/test-apps/happy/topologies/standalone
.
To use your own custom Happy topology in a test case:
- After constructing your custom topology, save it in JSON format. This saves
the topology state file in the
$HOME
directory:happy-state -s my_topology.json
In the test case script, locate the topology file being used. Topologies in test cases are typically assigned to the
self.topology_file
variable. For example,test_weave_echo_01.py
uses the following topology for a default OpenWeave build:self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \ "/../../../topologies/standalone/three_nodes_on_thread_weave.json"
আপনার কাস্টম টপোলজি স্টেট ফাইলে নির্দেশ করতে টপোলজি পাথ আপডেট করুন:
self.topology_file = "~/my_topology.json"
বিকল্পভাবে, আপনার কাস্টম টপোলজি স্টেট ফাইলটি ওপেনওয়েভের সাথে অন্তর্ভুক্ত একই স্থানে রাখুন:
self.topology_file = os.path.dirname(os.path.realpath(__file__)) + \ "/../../../topologies/standalone/my_topology.json"